Module Scripts
Module scripts (or modules) normally contain code that does not run until they have been required. The code you write will run under the same restrictions as the type of script requiring it, meaning:
- Modules required by local scripts will run their code as if it were a local script
- Modules required by server scripts will run their code as if it were a server script
Modules can be stored inside any type of script, though the recommended places to store them are:
StarterPlayerScriptsorStarterCharacterScripts- for modules required by local scriptsServerScriptServiceorServerStorage- for modules required by server scriptsReplicatedStorage- for modules required by local and server scripts