Require() not working

require(AssetID) which is a Module script is working as expected.
It keeps giving me this error. I’ve looked back at a few of these similar ones and tried those but it didn’t work. I switched on Allow Copying but it doesn’t work.

You need to name the module instance you uploaded to the website as “MainModule”, not “WhitelistingUsers”.

So I have to name the asset as MainModule?

You need to take the ModuleScript you uploaded, rename it to “MainModule” then update the one on the website by just reuploding it.

1 Like