Also, does it have to be named “MainModule”? A lot of threads say that is a requirement, but then all my models will be named “MainModule”. Seems like a pain of unorganization.
Yes this is the case. The model name (on site) does not need to be MainModule though, it can be anything but the instance itself must be named. My solution to this is to keep my web modules in a Folder instance for organization. Example:
GameModule (Folder) > MainModule (ModuleScript)
I’d then upload the MainModule instance.
Yep! You’d need to use InsertService on the server to load the module (as a model). Then you can parent the loaded module somewhere the client can access (e.g. ReplicatedStorage. ReplicatedFirst will not work though since instances only replicate once!) and require it. Note that that means the source code within the module is technically accessible on the client
(through decompilation) however this is unavoidable if you’re running code on the client.