Confused about requiring module scripts

I am making a system for some products I am making to sell.

I have made it so the source code is inside a module script (as in the heirachy) named MainModule, and the module script has been published to Roblox.

The whole reason I have done this is that we don’t want to share the code yet. Therefore, I have obfuscated the require()

However, it does not seem to also get the scripts inside the module script.

Do I need to make a function inside of the module script, which will make the scripts and the code, then run that function from the module script? Or am I just missing something stupid?

Modulescripts work by running once. then every require it returns the same table with the same functions to everything. If you want that table then you must use require

Alright, I’ll make a function inside it to make the scripts and then will fire that function from the requiring script. Thanks.

Is there a specific reason for doing it this way? Personally I found that security through obscurity complicates things more than it helps.

The limitation to requiring a module through assetid is that the module must be public so it it’s counterintuitive if you want to keep the code within it private.

Well I use a website to obfuscate it so it isn’t much of a problem. It’s also we want to make sure that they are allowed to use the product and if it is open sourced they can easily remove the bit checking if they are allowed to.