Hi everyone,
Why Server-Side Animators Are a Bad Idea
I’ve been doing quite a bit of research on this topic, and I feel like it’s not being addressed clearly enough.
A lot of people say that animations should always be played on the client to avoid unnecessary load on the server, which makes sense. However, very few actually explain what that means in practice.
From my understanding, to properly do this, you need to instantiate the Animator objects on the client, not the server. Otherwise, animations may also play on the server, which is just a waste of resources.
While testing with a few players in a local server setup, I noticed that if the Animator replicates from the server, animations get played on the server too. That seems inefficient…
My Setup and Workflow
So in terms of workflow, here’s what I’ve set up:
I have a module called ServerNetworkController on the server side, which tells each client whether they should play an animation, and on which instance (either an NPC or a player).
By default, I destroy any Animator instances that are created on the server.
On the client side, I use a module called AnimationService that handles playing the animation using the parameters provided by the ServerNetworkController. If the target Humanoid doesn’t already have an Animator instance, the module creates one.
Just to clarify, this Animator is created locally on the client. Any animation track played from this local Animator won’t be replicated by the server, which means it will never be played on the server.
I’d love to hear your thoughts or experiences with this. Am I missing something?
Thanks!