How do I insert an animation into a player and play that animation? I have no attempts.
✓ ANSWER ACCEPTED
How do I insert an animation into a player and play that animation?
1 answer
✓ Accepted answer
Once you did it, make sure you change the "AnimationId" property with your AnimationId. To see your animations, go to Inventory > Animations
Then, add a LocalScript and add an Animation inside it.
To insert a animation, make sure you right click on the LocalScript, then find for the "Animation" instance.
Before doing everything, open the LocalScript then write the following commands.
local player = game:GetService('Players').LocalPlayer
local char = player.Character
local humanoid = char:WaitForChild('Humanoid')
local animation = script:WaitForChild('Animation')
-- Inside a function
local animTrack = humanoid:LoadAnimation(animation)
animTrack:Play()
I hope I helped you!
This discussion is preserved as it was. New answers, comments, and votes are closed.
