For example, I created a sprint animation in the animation editor. How would I insert it into a ROBLOX player?
✓ ANSWER ACCEPTED
How could I insert an animation into a player?
1 answer
✓ Accepted answer
First, you need to get the animation ID.
After that, you need to load the animation into the player. Once it is loaded into the player, you can play the animation.
local anim = Instance.new("Animation", script.Parent)
anim.Name = "Animation"
anim.AnimationId = "rbxassetid://ANIMATIONIDHERE"
-- This script assumes you already have the player's humanoid.
local track = humanoid:LoadAnimation(anim)
track:Play()
If you need more help with it, here's the ROBLOX wiki post on this. http://wiki.roblox.com/index.php?title=Animations
This discussion is preserved as it was. New answers, comments, and votes are closed.
