Basically, I been scripting for about 4 years and I’ve been working on a Doors game that involves around old Roblox. Looking back to my old script, I noticed that the functions are clogging up my old script and I need to organize my code with Modules. So, I switched my old script from “Workspace” to “ServerSideService” (To prevent exploiters for checking my code).
At first glance, everything seemed pretty well until I’m a bit concerned about the amount of Module Scripts I’ve created. Is this considered normal or bad practice? Is this going to cause performance issues? Let me know what you think.
looking at the screenshot, it seems very easy to maintain or extend so it is a good sign.
lua requires() will run the module script once and cache the returning object. so it is not much different performance wise than shoving all code into a single file
Its not bad practice, i think it looks well structured but if there is logic that can be used multiple times id suggest making a util module for it ( i have no clue if this is the case )
structuring your modules in a way where you have a script and that script calls a controller or service makes it very dynamic thats all you can do to increase it.
Hey! You’re good, but if there is more than one person working in your game you should consider collect all the functions of your modules and see what functions are similar, and then divide the modules by subject (what does the module), so you put the similar functions in the same module for simplicity.