Is there any way to ban someone directly when they exploit? Please let me know!
If it were so easy, exploiters wouldn’t exist
There aren’t many if any anti-exploits that are universal so you have to implement your own system that detects exploit and ban them from there.
You must create your own system to detect if someone is exploiting. If there was an engine method for detecting exploits, then there wouldn’t be any.
The two most common ways to detect an exploiter is sanity checks, and securing your events.
Sanity checking in programming is simply checking to make sure that an outcome is viable with prerequisites. For example, imagine a handcuff system in a game. The handcuff tool automatically arrests someone when you click on them. However, the handcuffs are only given to people in a specific group. Since exploiters are able to give themselves anything they want on the client, that would make your tool check pointless. You would have to implement a function inside of the Arrest
event to check if the person is in the group. If not, congratulations, you found your exploiter! Punishment from that point forward is up to you.
The second way is securing your events. This method was also implemented in the previous example, but it’s simply making sure that events are fired properly. Clients can fire events whenever they want. It is important for someone to make sure that proper prerequisites and arguments are fulfilled. Making a private key on the server that needs to be given for the event, or checking if they have the correct tools before allowing the function to be called is a proper way of doing this.
There is no magic way to stop exploiters, but doing the easy ones (making sure players aren’t above a specific WalkSpeed) will make it more difficult for the script kiddies to be able to do their thing.
One thing to note is that it is inevitable that, as your game gets more popular, exploiters will find your game to be a more valuable target for probing your events and knowing how it works so they can exploit it.