Animations only playing on client - not replicating to server

Hello all.
I’ve been experiencing an issue where my animations don’t replicate to the server, causing issues with sword hitboxes etc.
Here’s a video showing both the client and the server;
https://cdn.discordapp.com/attachments/756966445166100550/774796077375029248/CPVcEd5svb.mp4
I’m unsure what’s causing this. Here’s important keypieces of information that should be relevant here, though:

  • The animations are being played directly through an Animator instance, which is created from the server and awaited on client.
  • The animations are owned under the same group as the game.
  • Definitely not an issue with scripts being slow etc.
  • Animations are being played on client
  • The animations weren’t “directly” exported into our group - our animator sent us .rbxl files of the animation objects, which I then exported into the group.

What I tried;

  • Creating the Animator instance on server, rather than having it pre-added in studio
  • Parenting Animator instance directly to character

Help would be greatly appreciated. Thanks!

EDIT:

Okay… This is really weird.
I’m playing the animation through a 6-line script in the command bar in studio:

wait(3) 
local Char = workspace.avozzo 
local Animator = Char.Humanoid.Animator
local Anim = Animator:LoadAnimation(Char.Animations.Greatsword.Light_1) 
Anim:Play() 
print('Played')

and running this through the command bar doesn’t show the animation on server, e.g the character is unmoving. When I run this script on server and then switch to the client’s perspective, though, it’s being played!

I’m really unsure what to make of this. Help would be greatly appreciated. Thanks!

One of the reasons I think is that you have to make the animation by yourself.

The game is created under the same group where the animations were exported to - what you said would only apply if the game was created by yourself (e.g not in a group).

  1. Try messing with the animationPriority in the animation editor and set it as an Action(2) priority.

  2. If that doesn’t work, make sure that your animationId is using https not http (roblox should automatically convert it to a rbxassetid but if it didn’t then double check)

  3. Are you stopping currently playing animations before playing the slash animation (This shouldn’t really be an issue if the slash animation priority is higher)?

  4. Worst case scenario you may have to fire a remote to the server and have the server play the animation or have it fire every other client if needed.

Those are my guesses on how to solve the issue. Hopefully one of them works!

Why would 1 and 2 matter, if it’s a replication issue? But no, it isn’t any of them.
I’ll look into the http one tomorrow

There might be an animation “overwriting” the slash due to it being a lower or same animationPriority as it.

As for the http, the short but simple answer is http is unsecured (so roblox doesn’t allow it) and https is secured.

It could also be how you’re loading and playing animations on the client (so you may want to provide any necessary code).

Back on PC, can give more info;

  • The animation IDs are all rbxassetid’s
  • I ran Animator:GetPlayingAnimationTracks() during the weapon swing - only the weapon attack animation was playing.

Either way it wouldn’t make sense regarding your animation priority statement; if there was another animation playing which had higher animation priority, both client and server woud see the animation with the higher priority.

Okay… This is really weird.
I’m playing the animation through a 6-line script in the command bar in studio:

wait(3) 
local Char = workspace.avozzo 
local Animator = Char.Humanoid.Animator
local Anim = Animator:LoadAnimation(Char.Animations.Greatsword.Light_1) 
Anim:Play() 
print('Played')

and running this through the command bar doesn’t show the animation on server, e.g the character is unmoving. When I run this script on server and then switch to the client’s perspective, though, it’s being played!

I’m really unsure what to make of this. Help would be greatly appreciated. Thanks!

2 Likes