Hi, so I am extremely new to module scripts, and I want to ensure security on my script. I have tried putting 'script = nil' everywhere, but it seems to return an error. WO10: Built-in global 'script' is overwritten here; consider using a local or changing the name. Any suggestions?
COMMUNITY QUESTION
Script = Nil is not working in my ModuleScript, does anyone have a solution?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

12 comments
Why would you do that?
That doesn't make scripts any more secure.
Why would you be setting the script to nil?
This is the third one. Why would you do that?
Only legends do dat
is he nilling the script because he thinks the script can't be read that way?, its still there in memory if its still executing
Module scripts are already secure if they are in a location the client cannot access. I have no idea why on earth you would write script = nil. It makes absolutely 0 sense.
Wait wha...? Why would you ever want to do that tho?
This is probably why he’s trying to do this -> http://robloxdev.com/articles/Using-Private-Modules
Not too sure as to why this is downvoted.
I only use
script = nilwhen working with Private Modules anyway. Elsewhere, you do not really need it at all. If you are using a Private Module, make sure you have uploaded on Roblox and named it "MainModule".This question has already been answered https://scriptinghelpers.org/questions/28712/how-does-script-nil-work