Animation is not working

Trying to make a walk animation it’s not working at all, I tried using WalkAnim too but still didn’t work.
Script:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		char:WaitForChild("Animate").run.RunAnim.AnimationId = "rbxassetid://9988033146"	
	end)
end)

(This is my first time making a custom animation, So yeah pretty bad at it)

1 Like

Ok so, the first you must create Script in ServerScriptService, the second, put this script:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAppearanceLoaded:Connect(function(char)
		local humanoid = char:WaitForChild("Humanoid")
		local animator = humanoid:WaitForChild("Animator")
		
		for _, track in pairs(animator:GetPlayingAnimationTracks()) do
			track:Stop()
		end
		
		local animationScript = char:WaitForChild("Animate")
		
		-- If avatar type is R15
		animationScript.run.RunAnim.AnimationId = "" -- rbxassetid://[animation_asset_id]
		
		-- If avatar type is R6
		animationScript.walk.WalkAnim.AnimationId = "" -- rbxassetid://[animation_asset_id]
	end)
end)

and third, find or create animation asset and copy his ID.

upd:
And yes, I forgot to say that for each type of avatar (R6 or R15) you need to do separate animations.

2 Likes