-
What do you want to achieve?
I want to set my script parent to nil -
What is the issue?
Doesnt work -
What solutions have you tried so far?
Setting it to nil
script.Parent = nil
What do you want to achieve?
I want to set my script parent to nil
What is the issue?
Doesnt work
What solutions have you tried so far?
Setting it to nil
script.Parent = nil
That would work, however you need to do that at the top of the script, otherwise it will disconnect all connections you’ve connected before that.
i did it at the top, it didnt work
What part about it didn’t work, what are you trying to achieve?
You could try this
local new = Instance.new("Part")
script.Parent = new
--Since the part's parent is never defined, the script's parent is now also nil in a way.
You can use :Destroy()
script:Destroy()
will set the script parent to nil for you, and also call the garbage cleaner to clear up the allocated memory!
If that is the case, they should also try:
script.Disabled = true
then to get it back again:
script.Disabled = false
I’m confused now. So what do you want to do. Delete the script? Do you want to bring it out of nil at one point?
im trying to hide my anticheat to prevent exploiters from disabling it or deleting it, the warn just says that the current parent is playerscripts (means that it didnt work)
Client side anticheats are bad for that reason. No matter what you do, cheaters will be able to see and remove it
Exploiters can read from memory
i know, people that are new to scripting exploit wont know how to read memory tho
better than nothing tho, and i already have a serversided anti tp but i just want more security
Make your AE serverside.
So, you can hide the script inside a HopperBin but the exploiter can recover it using GetNilInstances()
, client antiexploits are not recommended at all as they are bypassable. Make your anti exploit serversided. If you seriously want to try a client detection, you can detect the deleting of a localscript (from the client with a serverscript, use ancestrychanged thats all i can give for you).
and i know getnilinstances() exist, im just saying that, if they dont rly know about scripting or have a paid exploit, they cant use it, or dont know how to use it
local hopperBin = Instance.new("HopperBin", nil)
script.Parent = hopperBin
Put this inside your LocalScript,