I have problem with my sync animation script some time when player fire a remote player that fire the remote will see their animation slower or faster than another player but another player will see their animation normally not slower or faster than target
Player that fire remote screen:
https://gyazo.com/1af37ecfcfcf3c56ed6cef8995e2aac5
Another player in server screen:
https://gyazo.com/f79a4f9bbbc27ce29a5a2888da9b8ee5
Here is my source code of my remote:
SyncAnimation.OnServerEvent:Connect(function(plr, target)
if target and target.Character:FindFirstChild("Humanoid") and plr.Character:FindFirstChild("Humanoid") and target.Character:FindFirstChild("CurrentEmote") then
for _,current in pairs(plr.Character.Humanoid:GetPlayingAnimationTracks()) do
if current.Name == "CurrentEmote" then
current:Stop()
if plr.Character:FindFirstChild("CurrentEmote") then
plr.Character.CurrentEmote:Destroy()
end
end
end
for i,v in pairs(target.Character.Humanoid:GetPlayingAnimationTracks()) do
if v.Name == "CurrentEmote" then
local CurrentEmote = Instance.new("Animation")
CurrentEmote.Parent = plr.Character
CurrentEmote.Name = "CurrentEmote"
CurrentEmote.AnimationId = target.Character.CurrentEmote.AnimationId
local emote = plr.Character.Humanoid:LoadAnimation(target.Character.CurrentEmote)
emote:Play()
repeat wait() until emote.Length > 0
emote.TimePosition = v.TimePosition
end
end
end
end)