Can somebody help me, I don't know how to use the keydown event, and I'd like someone to explain to me how to do it and make animations, and If you're nice enough you'll also tell me about velocity as in body objects.
✓ ANSWER ACCEPTED
How do people make animations play with the "Keydown" event?
1 answer
✓ Accepted answer
User = game.Players.Estomac
UserMouse = User:GetMouse()
Animation = Instance.new("Animation")
Animation.AnimationId = "http://www.roblox.com/Asset?ID=0" -- Animation's id
Animation.Name = "Name"
animTrack = User.Character.Humanoid:LoadAnimation(Animation)
UserMouse.KeyDown:connect(function(key) -- keydown function
if key == "p" then
animTrack:Play()
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
How would you make that accessable for everyone, instead of 1 person?
LocalPlayer