Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Do I Load An Animation?

So I made an animation, exported it to roblox, and now I don't know what to do with it. It is a custom walking animation. How would I put this into every player and play it?

1 answer

✓ Accepted answer

To play an animation you need to load it into the humanoid, here is a basic example of how to load an animation and play it.

--LocalScript
-- Import animation
local animation = Instance.new("Animation")
animation.AnimationId = "AnimationID"
local player = game.Players.LocalPlayer
player.CharacterAdded:connect(function())
	player.Character.Humanoid:LoadAnimation(animation)--Loads the animtion into the character
	animation:Play()--Plays the animation
end)
 

If this helped then don't forget to hit that accept answer button, it gives us both rep!

2 comments

0

Thanks! Also, how do you put in a jumping animation?

0

You gotta connect it to a changed event and connect that to Humanoid.Jump.Changed

This discussion is preserved as it was. New answers, comments, and votes are closed.