I know how to use ModuleScripts, but I'm unsure as to how exactly I would use a private module.
Would I use it like a normal ModuleScript, or would the private module run its own code, or what?
I know how to use ModuleScripts, but I'm unsure as to how exactly I would use a private module.
Would I use it like a normal ModuleScript, or would the private module run its own code, or what?
To create a private Module
Create a standard ModuleScript, and make the name of it MainModule. Upload it to Roblox, and you're done.
To use a private Module
Just do require(moduleId) and it will load in the module for you. This only works on Roblox servers, so you won't be able to test in Studio if you're using it.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
I know that much, but do I need to use it like a normal ModuleScript, or will it run itself?
"Just do require(moduleId) and it will load in the module for you" - What do you think, genius? Of course it's used like a normal ModuleScript: That line requires it in.