Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How Can KeyPress Event Play An Animation?

Asked by 9 years ago

I Am Going To Do A Keyboard Commands Set. How Should I Do It? The Key Is "R".

0
We need code we can't help you without seeing what you have tried or currently have this is not a request site Prioxis 673 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
    if key == "r" then
        --play animation
    end
end)
Ad

Answer this question