How do I Sanity check, I don't understand how it work

Hello developers!!

I’m Tranquananh2811, and I’m currently having trouble understanding sanity checks on remote events. I don’t know how to do it even if I watch tutorials and read some documents. Can someone please explain specific on how to use Sanity Check on remotes event??

Well, let’s say we have a local script in a plot-based building game. The local script works on all the placement system of the player, but we want to check for example the name of the part that is placed. Unfortunately, we can’t do it on the client because an exploiter can easily change the name of the part and the local script will detect it.

This is where we’re gonna use a remote event. We’ll connect to a server script and check the name of the part there. Then the exploiter would not be able to manipulate the local script.

This is what sanity checks are. The client (player) can change instances and as well delete them but locally. That’s why local script detects it, it happened locally.

1 Like

In conclusion, sanity checks are checks done by the server to ensure exploiters are not sending false information.

2 Likes

So I just check the information/data that I send to the server??

Yeah, just make sure you check it on the SERVER and not the client.

2 Likes