Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Questions about require()?

Asked by 8 years ago

I have recently thought some questions about the "require()" function.

My questions: -Is it 100% secure? -Can you actually access the module script from it? -If so, how and how can I prevent this?

2 answers

Log in to vote
1
Answered by 8 years ago

require by id

When you require by id, it returns the module and makes the module parent to be nil. As a result, the ModuleScript can not be directly accessed, however the primary issue is the function environment:

Every single function which is returned by the module has a function environment. In this function environment is the script object. If a script can obtain this script object, it can parent it to Workspace and save the place with the SavePlace API

Ad
Log in to vote
0
Answered by 8 years ago

I dont think it can be hacked from? I mean is that possible. Didnt they make the require() function so it can protect your script from being stolen?

0
It still can be. JamesLWalker 297 — 8y

Answer this question