Hey, i recently saw that many people are scared of cheaters so they perform every task on server, personally i understand that. As for lazy developer, i made some stuff server only, for example while loop for visuals on server or overall tweening on it. But this was model specific, still many people don’t know when the Client should be used and makes those funny mistakes.
To make it simplier, some things on roblox are like they are, and we can’t change them, any super advanced anti-cheat will fail, and at the end i can guarantee that anti-cheat is useless.
Problem of anti-cheats
For those who don’t know, things such as player character and every local scripts are handled client-side, soo no matter what we will try to make, player still can change his walk speed or jump power to the maximum, or he can still break our gui and send 1000 remotes per second. Please consider writing safe code, instead of making anti-cheat, if you still need it, make simple client-sided anticheat for beginners, not every exploiter is coder and he might don’t know how to break your game, he simply uses gui or some other sort of cheats, if you update your game frequently, cheaters will have problems usually.
Now, when we decided that we don’t want to spend a lot of memory usage on anti-cheat that couldn’t work, we should talk about things that you can do completely on client, there are some exceptions of them like when we want to add some custom VFX to them.
Examples of such things:
1. Stamina or Movement:
Stamina or Movement are usually something like change walk speed and play animation, this doesn’t require any replication, cheater can simply change values, soo stamina should be handled on client, this will also allow you to create smoother gameplay as there is no delay between key press and effect
2. Visuals:
Many players use touched event for detection of explosion or bullet, it’s OK if we have slow rocket but, creating raycast or bounding box would be much better, explosion part can be tweened on client to achieve better results
3. Animations:
Nothing more to add that player’s animations replicate to server
4. Ambient:
Many people want to have ambient synced, i understand it, but still having time system for visuals or some sounds of frog in the swamp is not required to be looped on server, if you want to have good ambient then simply make it invidual for each client, you can detect position to check if player is in correct zone to play the sound
5. Vechicles:
Vechicles usually use constraints which mean they are sometimes buggy, but many players doesn’t want to give full vechicle control to client because they think their game will turn into lumber tycon flying cars race, don’t worry about flying cars, if you are soo scared that one cheater will fly your beatifull car, add some raycast every 10 seconds and check distance from the ground, if it’s strange then explode car or smth
Those were 5 things commonly made wrong way, please consider change, i believe i helped you, thanks for reading
Edit: About VFX, i forget to add that they shouldn’t be on server side, i forget to add that you should send another remote to every client soo VFX can play for them
Edit: I also forget to add that client-side anticheat is enough most of the time due to fact that most exploiters aren’t those who write code but use it, if you update game often and overall try to patch exploits you should be fine