"Adding" replication to the old 2007 Animator

NOTE: I’m unsure where this topic should go.
It can either be in #help-and-feedback:creations-feedback or #resources:community-resources as far as im concerned, help would be appreciated.


Recently, I have been trying to fix old broken scripts that were effected by FilteringEnabled, and while playing around with scripts that I fixed, I thought It would be nice to fix the old Animator before animations existed, and to otherwise optimize it, and remove some unessecary, or no longer used methods of animation.

While this isn’t the most important thing to ever exist in the whole wide world, I thought It would be cool to share for the 2 people who are interested, and want to know about this, despite it (to me at least) being pretty simple. And while I dont cover every detail about it, im mainly covering just how it works, and its result, which I think I have accomplished what I was trying to do.

What is FilteringEnabled?

FilteringEnabled was an old feature that allowed for client changes to replicate to the server. This was around since the early days or roblox until it was removed in 2018 to prevent exploits that otherwised absued this form of replication. as a result of this change, LocalScripts that once replicated to the server would no longer do that, not only working on the players computer, thus breaking millions of games at the time, including this script.

What does this “fix” do?

As script only uses the client, it wont be able to make any changes to the Server, so in order to have this affect everyone else, it needs to be to be able to work on every player, so I had to modify the code to run a loop, and to be able to apply changes to the other characters using said for loop by making the functions use their character instead of the players own character.

The fix I did also optimizes, and shortens the code. The original code has 248 lines, while with what I did, managed to reduce it down to 128 lines of code.
I also ended up adding the feature to set a limit of how many updates there should be per second, where its able to reduce how many times it has to run each time.

As a result, I ended up getting this, which I feel replicates the animations perfectly:

In the video, the animations updates 10 times each second, it is still smooth and works pretty well for old roblox, but if I were change it to work without it, it would be really smooth. But to me it doesnt need to be too smooth to the point where it can end up slowing down the game.

This is the best solution?

No, there are plenty of more things I could add to otherwise fix, or replicate the original experience, because as far as im concerned, physics from the server wont be as accurate, due to this only being done on the client. Another thing is that all forms of movement are in sync, one example being if you and another person were to walk to one area, both animations will move exactly the same.
Is this a bad thing? No, not really, but it can be infurriating to the person in the back who wants a async experience. However it can be an easy fix that I will have to work on later on.

General Questions, and Statements I think people might say.

“Animations replicate to the server, use those.”

Animations can for sure replicate this effect to the server, and at some point I can probably do that with this if I can get everything correct, but the main idea with this to just have the original code (albeit optimized and reduced) work with all players as opposed to just one player.

“More players can cause this to lag.”

Also true, but with the ability to slow down how many times it updates, I feel like it can help mitigate that, not to mention after testing a bit of around 50 players (to clarify here, a bunch of NPC’s on the server moving around with the animator affecting them), it would run around less than a few milliseconds. Considering that 144 frames run at around 6 milliseconds, I dont think it currently needs that much more unless people want that.

“Why not use the Server?”

The Server is a very important thing that should only be used if you are doing important calulations. The Client in the majority of cases is to be used for VFX and the graphics portion of the game, as if you were to use the Server for this, it will slow down, and end up giving you a bad experience within your game. Because this is a visual detail for the game to feel more alive, it would be best for it to remain on the client, as to not burden the server with any information.

“Recommended Update Speed?”

The recommended update speed in my testing should be at least 10 - 15 FPS (or 10 - 15 updates per second), as it will give you the bare minimum of its smooth animation, you can of course set it to however you want it to be, but you wouldn’t want to set it at a speed at makes it look unpleasant or cause any performance issues.

“Will there be more features?”

Sure, if it makes the basic system better to use and is faithful to the original animation, but as if right now its mostly finished, other than a few inconsistences here and there needed to be patched.

“You’re a genius for this!!”

I really am not, as far as im concerned I had a few hours of nothing to do, and wanted to do something fun with old code and share it with people to see. Not to mention this in terms of everything else I can do is fairly mild in comparasion.

“Why did you make this?”

Just thought it would be fun…



What do you think?
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

0 voters

7 Likes

Updating this in a while loop and making the client replicate this data allows for exploits. This is a back door and extremely unoptimized.

  1. This doesnt replicate to the Server as it isnt an Animation (which is one of the items that replicate to the server), its only something the client see’s as something visual, thus wont affect anything on the server as it wont see it. (Keep in mind Adding is in quotation)

  2. Optimization varies depending on how much you’re trying to do at a time, in which this shouldn’t be a problem unless you are running hundreds of things.

  3. A backdoor implies that this is a hack of some kind, it isn’t.

It’s as simple as getting the humanoid state and animating the body. The server code animates all players by moving the motors, sleeping the thread for the player until the motor is finished or a new signal is sent for a new state change.

This is exactly what the code does.

There is no need to do this if the Server already does this for you whenever the character does something at all, all you need to say is Humanoid:GetState(), and check if they are doing something specific, to apply a specific state. Compared the original code that has a multitide of functions to apply a single state.

It isn’t intended for the Server to see as it isn’t important for server to handle at all, instead the client does it as its for Visuals, which wont effect the Server at all. The system itself is very basic as already stated, for the original and current version I made, only difference is that

  1. There is less code for it to run
  2. It’s now only on the client, which handles the visual aspect while the server doesn’t have to say anything, thus removing any need to contact the server so it can focus more on important things.

The Client is what the players are going to see when playing, not the server, which is the more technical side, and should be reserved for everything important to the game, rather than the little details that people are going to see.

I don’t understand, how is this exploitable, a backdoor, or unoptimized?

4 Likes

Small Update

I accidentally removed the animation some items that handled aniamtions for items like the Classic Sword, it was added back to the system but I was able to reduce how much code is running down to 100 lines.
I also removed the Freefall and Sit function and combined them into a singular function, which is able to control all nessecary limbs.
There is probably more I can fix, but that will come at a later time.