Should I Migrate my Main Script that handles Rounds, Round Time, Round Rewards, Maps, Players Spawns, giving Round Items. That Would Use:
require(ASSET_NUMBER)
And So On.
Should I Migrate my Main Script that handles Rounds, Round Time, Round Rewards, Maps, Players Spawns, giving Round Items. That Would Use:
require(ASSET_NUMBER)
And So On.
If I am understanding the question correctly, this is about the security of having the script in the game compared to using require
. Security should be the same if both cases are on the server. A problem you may run into is the main script being out of sync if a new server comes up with either the place not updated or the module script not being updated, leading to seemingly-random errors when updating the game.
Yes, the MainScript is in ServerScriptService
So Security is the same but Module might make the MainScript Error when using require
?
An error could occur in 2 cases:
You will also want to develop with the option to use a local version because constantly uploading to Roblox will drastically decrease the speed of development and make testing harder.
Would i just Copy and Paste my MainScript Code into a module script? Is it that easy to use module scripts?
Theoretically yes if the game already uses ModuleScripts
. They do need to be loaded using require
in an existing Script
and the ModuleScripts
need to return exactly 1 value.
This strongly depends on the code’s architecture and how it is published. If the goal is to make it safer from exploiters, then it doesn’t accomplish anything while making publishing slower. It may be worth creating a separate thread reading ModuleScript
game architecture since this thread is about just moving code to ModuleScripts.