Animation not playing on cloned character?

For the background of the title screen in my game, I want to have a clone of the player’s character in a falling freeze frame like this:
image
In order to make the character look like this, I used an animation made in moon animator that is 30 frames long and looped but just keeps the body parts in this state, so the character is always in this position.

However, when I test the game, it creates a clone of the player’s character and places it there, and I tried to load the animation onto it, but it doesn’t do anything even though the code to run it executes (The chair is separate from the animation and just is put into the workspace from replicatedStorage):

This is the script that is put into the actual player’s character via StarterCharacterScripts, so when the player’s character is cloned, this script is too. When the clone loads in and is into position shown in the picture above, the remoteEvent fires and checks if the script is in the clone’s character and not the actual player’s, and if so, supposedly loads the animation and prints: “should be playing”. But the clone still looks like it does in the picture.

game.ReplicatedStorage:WaitForChild("FallingAnim").OnServerEvent:Connect(function(player, CloneName)
	if CloneName == player.Character.Name .. "Clone" then
		local Animation = script:WaitForChild("Animation")
		local Humanoid = script.Parent:WaitForChild("Humanoid")
		local Idle = Humanoid:LoadAnimation(Animation)

		Idle:Play()
		Idle.Looped = true
		print("should be playing")
	end
end)

I’ve tried looking at why this is happening but I couldn’t find any reason for it not to work so I’m not sure what to do.

2 Likes

You should probably make it looped from the animation editor, instead of Idle.Looped = true. I don’t have any other ideas on why this would error though.

1 Like

It is looped in the animation editor. So when I exported the animation and uploaded it to roblox it was already set to looped,

Since my game is a one-player game, I ended up not cloning the player and just moving them over to that location and playing the animation on the actual character, which worked. I just set the walkspeed and jumppower to 0 so they can’t move and when they press play they go back to normal. I’m still not sure why it didn’t just work on the clone though.

1 Like

Ran into same problem. No idea why is it not working.