|
| 02 Sep 2017 08:36 PM |
local mouse = player:GetMouse() mouse.KeyDown:connect(function(key) if key == "r" then playAnimation() end the title is the error im getting, the error is occuring at the 2nd line. also, this works in studio but not in the regular game.
Hippos eat walruses, walruses eat hippos. The circle of life. |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2017 08:37 PM |
KeyDown is deprecated, use UserInputService.
http://wiki.roblox.com/index.php?title=API:Class/UserInputService
|
|
|
| Report Abuse |
|
|
|
| 02 Sep 2017 08:55 PM |
Thanks.
Hippos eat walruses, walruses eat hippos. The circle of life. |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2017 09:01 PM |
it didn't work. game:GetService("UserInputService"):IsKeyDown(114) playAnimation() end) i don't get any errors, so it might be the function. the function is local in a playeradded event, if that changes anything.
Hippos eat walruses, walruses eat hippos. The circle of life. |
|
|
| Report Abuse |
|
|
|
| 02 Sep 2017 09:02 PM |
do you even wiki
game:GetService('UserInputService').InputBegan:Connect(function(input,gameprocessed) if gameprocessed then return end --if player is typing in a textbox if input.KeyCode == Enum.KeyCode.R then playAnimation() end end)
|
|
|
| Report Abuse |
|
|