Hi guys!
So I recently got into this ModuleScript business and I'm quite interested..
Let's say I'm working for this kid who pays me on a monthly basis in return for usage of my scripts, and he ends up not paying me after 3 months. I would be able to completely disable my scripts if I were to link all my scripts to my PrivateModule.
Now my question is; How the hell do I link them?
I've created a simple MainModule script with the following code:
local module = {} function module.test() print("Working Module!") end return module
This ModuleScript was named "MainModule" and uploaded as a Model to ROBLOX. I copied the ID and pasted the following code into my NORMAL script:
module = require(ID_HERE) module.test()
I published my game, but whenever I try to test the scripts in studio I get the error "Unable to find module for asset id" in my output, and I see no print from the ModuleScript.
Is there any way for me to fix this issue? I would honestly love to use this type of script, but for some reason I just cannot manage to get it to work..
Another question about these scripts is; How do I make sure only I can access this ModuleScript (Refering to the kid who didn't pay up)? I want to save my MainModule as a ROBLOX Module, be able to update it in my own games, and then have it update on other games where it's linked aswell via the require code.
Thanks!
Basically, if somebody else tries to require it; you can just blacklist their place id; or creatorid. If you check the "game" object, it will show you the place id; aswell as the userId of the player who created it. You could also check for a gamepass etc. Monthly renewals would need to be manually done, unless you had an external service that handled it, with the module script checking an endpoint api to see if that user has payed their fees etc.