I was able to change the default idle animation, but when trying other animations like walking or running, it doesn't seem to work.

This is the script that works:

game.Players.PlayerAdded:connect(function(player)
	while not player.Character do wait() end
	local character = player.Character
	local animateScript = character.Animate
	animateScript.idle.Animation1.AnimationId = '(id)'
end)

This is the script that doesn't work:

game.Players.PlayerAdded:connect(function(player)
	while not player.Character do wait() end
	local character = player.Character
	local animateScript = character.Animate
	animateScript.walk.Animation1.AnimationId = '(id)'
end)

I used the roblox wiki to find out how to do this. I get an error message saying "Animation1 is not a valid string value". I tried learning about string values but I didn't understand how any of it connected with animating. The idle animation (the script that works) doesn't use a string value but works anyway.

1 comment

0

You need to make the script check when and if the player is walking, and play the animation only then.