Ive tried to create a onKeyDown play animation script but nothing works help??
COMMUNITY QUESTION
Animation on key down?
1 answer
Put this in a LocalScript, then put your animation into the LocalScript: THIS IS CRUCIAL. Once your done put the LocalScript into StarterGui or StarterPack
local Mouse = game.Players.LocalPlayer:GetMouse();
player = game.Players.LocalPlayer
animation = script:WaitForChild("Name of animation")
enabled = true
Mouse.KeyDown:connect(function(key)
if (Key:lower() == "") then) -- Put the key you want in between ""
if enabled then
enabled = false
local animationTrack = player.Character.Humanoid:LoadAnimation(animation)
animationTrack:Play()
wait(5) -- How long you want it to take before you use it again.
enabled = true
end
end)
I hope this helped, don't forget to accept the answer if it does. :)
1 comment
0
P.S Join Xora Stduio :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Where the script at tho? This isn't a request site my friend.