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:
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.