Can anyone help me, cause i want to learn how to make animations by using keys. Thanks in advance.
✓ ANSWER ACCEPTED
How to make punching animation that can play using a key? or a punch tool. that can play by click
2 answers
✓ Accepted answer
So I wanted the (almost) same thing and I (think I) figured it out so here's the script
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
repeat wait() until Player.Character.Humanoid
local Animation = script.Animation
local Track = Player.Character.Humanoid:LoadAnimation(Animation)
UIS.InputBegan:connect(function(key)
if key.KeyCode == Enum.KeyCode.E then
Track:Play()
end
end)
Make the animation of the punch, then take the script and the animation and put them in StarterPlayerScripts
hope it works for ye
This is not a request site, you need to have some effort, try learning on how to make animations and how to use the keys on your keyboard in roblox wiki or in youtube
1 comment
0
I know how to make Animation But everytime i do it it doesn't work.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
also there where it says If key.KeyCode == Enum.KeyCode.E change the E in KeyCode.E to what ever key you want.
Sir Thanks so much. But if i want three animation to play like right punch left punch then kick ? what i need to do?
Try making the kick animation in the same animation maybe
^^^^^^^^^^ awnsered correcticly
Thanks so much.
did it work? cuz it didnt for me XD