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 change the walking animation?

I tried this script, but it's not working. And I created the animation.

function player()
game.player.LocalPlayer.Character:waitForChild("Animate")
game.player.LocalPlayer.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/Walk-item?id=240085256"
end
game.Players.ChildAdded:connect(player)

1 answer

✓ Accepted answer

You need to load it whenever the player's Character loads. With the CharacterAdded event.

This should be in workspace;

local animId = "http://www.roblox.com/Walk-item?id=240085256"

game.Players.PlayerAdded:connect(function(plr) --Player joins
	plr.CharacterAdded:connect(function(char) --Character loads
		local anim [ char:WaitForChild('Animate') --Animate
		anim.walk.WalkAnim.AnimationId = animId --Replace
	end)
end)

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