What I do for my games is I make a client and a server anti-exploit just for more security. In case my local script did not detect anything, at least I have the server and vice-versa.
Keep in mind that exploiter can fire Remote Events client sided so they can in some way cheat. Think youself as an exploiter and what if you fired a remote that is somewhat the main way of “winning” your game. You would need to add some sort of security checks so players don’t get a feeling that somebody else can cheat their way to faster stats which will make them uncomfortable and unpleased.
If an exploiter knows you are doing a client-side script to check for UI injections, they can also inject a script into your checking script to disable the checking, just like they injected into CoreGui.
A simple example is a store; ask the server, “can I buy this sword?”, and don’t tell it, “I can buy this sword.” The server should be the one checking everything from currency to experience points to levels, since it has the final say in what’s really happening. You should always be ready for someone on the other side of the bridge to outsmart you, and make absolutely certain the code you wrote is well tested for cases like someone throwing a NaN
at you or expecting an object and getting a table that looks like an object.
Quote from @Autterfly in this post.
When you’re coding your game you must always think of what the player can, and can’t do. If you understand that, you will gradually understand what not to do. For example, if you are to let players buy something in your game, you want them to be able to buy the sword, but you don’t want them to buy it for free. Think of all attack surfaces, all the ways an exploiter can harm your game, and fix it.
The server is the messenger, the client is the computer. Don’t overload the messenger with things that the client can do.
The server exists for the following things:
- Securing your game and filtering/validating input from the client
- Replicating information to all clients
- General things that clients should not be trusted to run (or can’t :p)
The server does not , and again not , did I say “not” twice? Well, I mean it. It does not exist for the following:
- Animating characters
- Rendering stuff in the game (visuals like gun bullets, effects etc…)
- Things that could be done on the client with, aka all things that don’t affect other players.
~~
Quote from @1TheNoobestNoob in this post. Thanks
So basically, it would be better if you make a server sided script only which deals with anti-exploiting. Any client side security mechanisms will be bypassed, always detect abnormal things on the server.
Anticheats generally should be done server sided because client side anti-exploits are easy to bypass. A good server side anti-exploit is impossible to bypass.
Basically, I based off other dev forum posts for my reply, and some things I have said belong to the proper owners that have said it in their own post.
Posts used to develop this message
Efficiency tips for MMORPGs? - #5 by Affenity
How you should secure your game - A beginner guide for secure networking and developing anticheats
Exploiting Explained
If you would need assistance making your anticheat give me a message on discord and I might be able to assist. Viken#0243