I didn’t have this problem before, but for some reason (maybe due to an update, not sure) this has been happening for the last couple of days. Animations aren’t replicating correctly between clients.
What do you want to achieve? I simply want the animations to play properly in every client, without being overwritten by running animation (or other default ones).
What solutions have you tried so far? I tried looking for a solution on DevForum and other servers, however I haven’t found anything useful yet. Initially I was playing the animations on the server; so I tried playing the animation on the client. Didn’t work either, so I tried playing the animation on every client through a remote event from the server.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
This is what I have so far:
-- (ServerSide)
remote:FireAllClients(hum,anim)
-- (Script in StarterGui)
remote.OnClientEvent:Connect(function(hum,anim)
local anim = hum:LoadAnimation(anim)
anim.Priority = Enum.AnimationPriority.Action
anim:Play()
end)
I believe that for some reason that Player2 doesn’t see when Player1 turns, so when Player2 does the animation on the client it moves Player1 in the wrong direction. Why don’t you just do the animations on the server?
Hello. Animations do not have to be replicated by you, as you can simply play it on the client and it is being replicated automatically. I suggest to always play them on the client, so you may have to less deal with Remote Events i.e use more precious network. Good luck
So some things might fall into my mind. Its fully possible to do animations from client that replicates to the server.
Have you made priority action in the animation by default?
Preload the animation by doing preloadAsync.
Have you tried this?
--- Preloading Animations ----
-- I usually have a folder with my clientanimations
local ClientAnimations = game.ReplicatedStorage:WaitForChild("ClientAnimations")
local ContentProvider = game:GetService("ContentProvider")
local assets = {}
for i,v in pairs(ClientAnimations:GetChildren()) do
table.insert(assets,v)
end
ContentProvider:PreloadAsync(assets)
-- make some paths to the animations
local Animations = {
ChestAnim = ClientAnimations:WaitForChild("ChestAnim"),
SpinMachine = ClientAnimations:WaitForChild("SpinMachine"),
Dash = ClientAnimations:WaitForChild("Dash"),
}
-----------------------------
--- get the humanoid of the character
local Humanoid = .....
local Track = Humanoid :LoadAnimation(Animations.Dash)
Track :Play()
Turns out I kinda fixed the issue by disabling the animate script while it’s playing the animation in question, I don’t really know if it’s the best choice tho, and I still don’t know why it happens.