Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I insert an animation into a player and play that animation?

Asked by 7 years ago

How do I insert an animation into a player and play that animation? I have no attempts.

1 answer

Log in to vote
1
Answered by
Ziruken 139
7 years ago

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!

Ad

Answer this question