Play Animations Locally

As a developer, it is currently impossible to prevent exploiters from playing their own character animations, without resorting to extreme measures which may not be supported long-term.

A long-term solution would be to allow developers to play animations locally, so that we can create our own animation replication systems. Some proposed solutions could include a toggle for legacy animation support, or even a service which would allow developers to whitelist animations on a case-by-case basis.

I’ve recently stumbled upon this issue, as shown in the post linked.

6 Likes

Humanoids/AnimationControllers will have an Animator object in them that controls replication.

If you delete this animator object, you can recreate it locally on the client through Instance.new or LoadAnimation. This should not replicate any animations you play.

Does this work for playing animations locally or is something else fighting with this system?

4 Likes

This seems to work for now, it still lets local animations play, however, I’m still a bit cautious that this functionality could break at any time, so I’ll probably have to code redundancy in-case the behavior of the animator object changes. There should be official documentation by Roblox whether this is intended and whether it’s here to stay.

I don’t know where I read it, maybe somewhere under the documents for the Animator, or something, but I do remember reading, that if the Animator object is created locally, it will not replicate animations.

So in my code, I make sure the Animate object is created by the server, and parented to the character (to ensure the animations replicate)

However in your case, maybe you could have the server check for the Animator on new clients, and once it appears, you can have the server remove it and send a signal to the client to create a local one.

Either way, this request is valid I think as it would be convenient to be able to just toggle if a client’s animations were local only or replicated.

2 Likes