-
What do you want to achieve?
I want to play an animation on a player’s stand -
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
- 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
What the other players see
It stays like this for 10 seconds and then replicates
The Network owner is the client and the stand is parented inside the character