Is Creating too many ModuleScripts considered normal?

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.

Here’s what I meant by this:

RetroDoors - SettingUpDrawers - Roblox Studio 1_2_2025 4_30_53 PM

I’ve seen worse :wink:

My guy had about 120 in one folder

You’re good don’t worry about it if its organized and easy to read who cares

Okay thanks man, I appreciate it

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.

1 Like

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.

hope this works for you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.