Animations not replicating to server

I am using animations for weapons in my game. On the client, the animations are loaded onto the Humanoid once the weapon is equipped. The animations run fine on the client, but once viewed on the server there are times where the animations are not replicated at all.

Example 1
Example 2

This problem is not animation specific, there are times where attack, idle or running animations are not replicated. What tends to fix the problem is playing the animation again. In the examples, my running animation is not replicated to the server, but by stopping and moving again, the running animation is played and appears normal on the server.

I am waiting for all animations to finish loading onto the humanoid before playing anything. In a last ditch attempt, I added a random wait time after loading the animations before playing anything, but whether the wait time is 1 or 10 seconds, the bug still occurs.

Any suggestions are welcomed, thank you!

EDIT: I rechecked a thread whose problem was similar to mine. Turns out someone had recently replied and given their own suggestion so I gave it a shot.

I was previously loading all animations into the humanoid when you first equip the weapon, the change I made was to only load animations when they were about to be used, instead of all at once. Changing my system to perform this way caused/revealed even more bugs, but once I fixed those, the weapons were animating as intended. See here.

Thanks for the replies!

Are you by any chance using a custom character construct? Animation replication bugs tend to be prominent with them, considering there’s quite a few threads regarding animation replication troubles. If you are using a custom character and not the defaults, I find that if you instance the animator ahead of time rather than waiting for the Humanoid to do it, there’s some kind of difference to be made.

A simple line should take care of this.

-- We only set the parent: find to use second argument
Instance.new("Animator", Humanoid)
3 Likes

Are you looping animations on client? ex.

animationtrack.Looped = true

If so, that could be the issue. (I’m not 100% sure tho.) You should try setting them to looped in the animation editor instead of the client.