If I have a changed function inside a module script and I require it twice, will the changed function run twice or once?
✓ ANSWER ACCEPTED
Requiring a module script more than once?
1 answer
✓ Accepted answer
See the documentation for ModuleScript.
A ModuleScript is a type of Lua source container that runs once and must return exactly one value. This value is then returned by a call to
requiregiven the ModuleScript as the only argument. ModuleScripts run once and only once per Lua environment and return the exact same value for subsequent calls torequire.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
How would you change a function in it after requiring it though? If you mean overrieing a function with getfenv() then the answer is no, it wont run twice
Sorry I was unclear, for example if I had a while wait loop inside, if I require twice will the loop run twice?
Attempting to require a module script more than once, the result is cached.