If I have a changed function inside a module script and I require it twice, will the changed function run twice or once?
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
require
given 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
.