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
01 | local Mouse = game.Players.LocalPlayer:GetMouse(); |
03 | player = game.Players.LocalPlayer |
05 | animation = script:WaitForChild( "Name of animation" ) |
09 | Mouse.KeyDown:connect( function (key) |
10 | if (Key:lower() = = "" ) then ) |
14 | local animationTrack = player.Character.Humanoid:LoadAnimation(animation) |
I hope this helped, don't forget to accept the answer if it does. :)