Animation replication delay

  1. What do you want to achieve?
    I want to play an animation on a player’s stand

  2. What is the issue?

When I play the animation on the client using an Animator inside an AnimationController, the animation takes about 10 seconds to replicate to the server

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have tried playing the animations on the server. It works properly however it has latency and I prefer playing animations on the client.

        local stand = plr.Character:WaitForChild("StarPlatinum")
		local animator = stand.AnimationController:WaitForChild("Animator")
		
		local loadedAnimation = animator:LoadAnimation(plr.Character.HumanoidRootPart:FindFirstChild("Idle"))
		local walkAnim = animator:LoadAnimation(plr.Character.HumanoidRootPart:FindFirstChild("Walk"))
		
		if plr.Name == game.Players.LocalPlayer.Name then
			loadedAnimation:Play()

			local connection do
				connection = plr.Character.Humanoid.Changed:Connect(function()
					if not plr.Character:FindFirstChild(plr.Data.Stand.Value) then
						connection:Disconnect()
					end

					if plr.Character.Humanoid.MoveDirection.Magnitude > 0 and not walkAnim.IsPlaying then
						walkAnim:Play()
					elseif plr.Character.Humanoid.MoveDirection.Magnitude <= 0 then
						walkAnim:Stop()
					end 
				end)
			end
		end

What the client sees
image

What the other players see
image

It stays like this for 10 seconds and then replicates

The Network owner is the client and the stand is parented inside the character

Play the animation on the player’s client, but also have the other clients play them locally.

If someone is facing the same issue, preload the animation and play it for all the clients like @beanandsoupguy said. (Thanks for the help btw)