Can't change default animations

I do know this question has been asked many times but nothing has worked

1st: I have tried to copy the animate script from the character but it just plays a blank animation

2nd: I have tried the official roblox tutorial and that’s no help here’s the code:

local Players = game:GetService("Players")

local function onCharacterAdded(character)
	-- Get animator on humanoid
	local humanoid = character:WaitForChild("Humanoid")
	local animator = humanoid:WaitForChild("Animator")

	-- Stop all animation tracks
	for _, playingTrack in animator:GetPlayingAnimationTracks() do
		playingTrack:Stop(0)
	end
	
	local animateScript = character:WaitForChild("Animate")
	animateScript.run.RunAnim.AnimationId = "rbxassetid://16744072591"
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://16744072591"
end

local function onPlayerAdded(player)
	player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
	print("Player loaded")
end

Players.PlayerAdded:Connect(onPlayerAdded)

For context I get no errors and the the animation is published by me

And here’s the game settings:
image

I’m really lost and nothing works if anyone knows whats going one please help me out.

2 Likes

Uping this post so it is visible again.

2 Likes

Have you found a solution to the problem?

I’ve just ran into a situation where I need to do this, but I already know I’ll run into this exact problem. I decided to just look up how to do it right now and here we are.

I’ve made it work once by creating a bindable event, coding said event inside the default animate script from the player’s character, then changing the local variable’s animation id’s to whatever I need, through the event.

Have you found a more simple solution? If not, that was my fix from a while back.

1 Like

If anybody else finds this and also can’t find a solution, I just had this same problem and I think what fixed it was me switching:

[Game Settings > Avatar > Animation] from {Standard} to {Player Choice}.

Not sure if this is 100% the correct solution, but I believe it is.

try setting the avatar type to R6

I ended up just editing the Animate script and attached a remote function to allow me to change the animations internally.
Thanks for the help though!