Script some times does not load animations

I have a simple script that does not load any animations on R6. This script works totally fine in a different game that I have but not in this game for some reason. When I reupload the animations it works, but if I leave the animations, it does not load. Sometimes it loads in, but most of the times it does not. Here is the script:

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		player.Character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://72764845998887"
		player.Character.Animate.fall.FallAnim.AnimationId = "rbxassetid://17452515603"
		player.Character.Animate.jump.JumpAnim.AnimationId = "rbxassetid://17452489390"
	end)
end)
1 Like

Is there any errors? Only thing I see here is that the animate script might not load instantly so you should do

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		player.Character:WaitForChild("Animate").walk.WalkAnim.AnimationId = "rbxassetid://72764845998887"
		player.Character.Animate.fall.FallAnim.AnimationId = "rbxassetid://17452515603"
		player.Character.Animate.jump.JumpAnim.AnimationId = "rbxassetid://17452489390"
	end)
end)
1 Like

There are no errors in the script

1 Like

Try adding a task.wait() or change player.CharacterAdded to player.CharacterAppearanceLoaded or both

stall a bit after this … task.wait(1 or 2)