The title says everything I need, which is only a quick question.
Is it safe and okay to parent a script (specifically a server script) to “nil” so it cannot be found by exploiters.
I don’t know very much about making anti-cheats, which is why I always had a friend do it for me. The only thing is, he never taught me anything about it. I never asked, so he never helped me learn. He unfortunately passed away in April last year, and since then I’ve really needed his help. Obviously he can’t make the anti-cheats for me, so I have to myself, which is a problem since I don’t know very much on how to. I’ve been learning, though.
I just wanted to ask if it is safe and if it would be okay to parent the anti-cheat script as nil so exploiters cannot find it.
First of all, stop using client-sided anticheats if that’s what you made. Second of all, if you really want to develop one, setting the parent to nil will not prevent exploiters from finding it.
If you, however, made a serversided anticheat, then just store it in ServerScriptService / ServerStorage so exploiters don’t have an idea of how your game works by seeing script names. Lastly, exploiters cannot see server sided script bytecode no matter where it is stored.
Correct me if I’m wrong, but the only way for clients to see objects parented to nil are if they had a memory reference to them. Since the script was before-hand in serverscriptservice clients will not be able to see anything. But if it had been replicated to the client, and the client exploited, they could prevent :Destroy() from removing the instance in the memory and re-parent it (in their client).
Thing I still don’t understand is why you’d like to destroy an anticheat script? If I remember correctly, they don’t work when parented to nil.
Scripts do work when parented to nil. I had made a small anti-cheat script and parented it to nil first thing when the server starts. All of the code still ran perfectly fine still. I just needed to know if they could still find it or not since I have very, very basic knowledge on good anti-cheat lol
Alright, you might be right since the code of the script has already been executed, maybe it was with :Destroy() with what they’d stop running? Anyways, no they won’t be able to find the anticheat, as I mentioned before, but I don’t see why you’d need to parent it to nil to be honest.
Yeah. Scripts stop running after being destroyed. I destroy scripts from the dev console in my games a lot when I’m trying to mess around in my game with other friends lol
And I just thought it would prevent it from being visible at all. One of my friends spend so much money on exploits once and had destroyed every script in ServerScriptService
It’s not a waste of time and helps alot, you can detect so many exploits on the client, far more than you can on the server such as clicktp this can be detected instantly on the client without any magnitude checks