How do I prevent a exploiter from modifying or deleting a local script?

I’m making a sort of anti noclip script and I’m using a local script to send information to a server script.

Basically, i’m tryna check if there’s a mismatch between the can collide values of a part a player has collided with in the server and the client nd the problem is a exploiter could just delete the local script that sends information to the server.

I tried looking for solutions in the devforum.

2 Likes

Or maybe a way to get info from the client without a client script?

There is no solution to this unfortunately. The client has full control over their game. The general rule of thumb is to not trust the client in any way. Even if they don’t delete your local script they can just send false information through your remote event. Generally your first line of defense should always be a server side anti cheat. Client side anti cheat can maybe catch primitive attempts at exploiting but can always be disabled.

You should make your Anti NoClip on the server. Period. It will be more complicated, but it will be way harder to bypass. Everything that can be done on the server needs to be done on the server.

I have a potential solution:
Add this to your scripts code:

script.Destroying:Connect(function()
	local Clonned = script:Clone()
	Clonned.Enabled = false
	Clonned.Parent = game.ReplicatedFirst
	Clonned.Name = "SOME_GEBRISH_OBFUSCATED_NAME_HERE"
	Clonned.Enabled = true
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.