Making a module script just for one script. Making a script for every element of your game?

I’m confused with organizing scripts for a game. Am i doing this right?


1 Like

It depends, Most people like to organize their games into separated Modules and require them once needed. That’s up to you. But in my opinion i think you’re doing it right.

This is fine there’s nothing wrong with this

There is.

Any exploiter can see the modules scripts on ReplicatedStorage that i use for my server scripts.

So i might have to store them on ServerStorage.

if there being accessed by the client the changes made in the module script only happens for the client Filtering Enabled exists

There’s nothing you can do about that, Only put Objects inside ReplicatedStorage if you want to access them via both Server and Client Sides. Anything that you won’t use in the Client should be inside ServerStorage. (P.S: Correct me if i’m wrong, But exploiters can’t modify Scripts)

Hackers can only modify local scripts and module scripts modifying any of these will only effect there client if you have important server code in a module script and a hacker runs it it will only show for them as the module code is being executed on the client NOT THE SERVER

That should be the intended purpose of ModuleScripts if you’re going fully modular. See single-responsibility principle. A ModuleScript per element, shard into more if appropriate. Over 2000 ModuleScripts is very normal for any serious project; for example, one of my projects has 500 ModuleScripts dedicated to just sound data.