Safest place to put my modules?

Im making a game, and most of the modules ive written are important classes or “services” (as I call them) to make coding in my game much easier. Now for testing reasons, I put most of the classes in Replicated Storage, but i’m going to move them to ServerScriptService now.

My question is: What is the safest place to put your modules/classes between ServerScriptService, ServerStorage, and ReplicatedStorage?

And another question I have is : What use cases would approve of client-sided modules and/or classes?

1 Like

ServerStorage and ServerScriptService can’t be accessed from the client which makes exploiters unable to access them.

2 Likes

storing it in replicated storage is more for when both server and player need access to the module, but when you put in the server storage is when only the server needs access to it ,serverscriptservice is what it literally tells , which can only be accessed by the server too as server storage but better for script, server storage is to store more stuff like modules that only server can use etc

1 Like

If the client doesn’t need access to them, put them into ServerScriptService

1 Like

Wait but why is ServerScriptService better at running scripts than modules?

it can run modules normally too. it’s only that some people never use it for modules.

So should I just seperate my server scripts and modules into ServerScriptService and ServerStorage respectively? or is there no real benefit other than readability and organization?

as i told server storage is more used to store models, that can only be accessed by the server, like if you want it to store any tool or any map it will be better to put it there, which you only want the server to
access it

1 Like

ServerScriptService is better for scripts in the way of it running scripts as soon as the server starts.
ServerStorage will not run any scripts unless you re-parent them somewhere where scripts can run

However with modules it really doesnt matter, if they are only for the server, you could use either ServerStorage or ServerScriptService, and it would be the same.

2 Likes

Your modules are only safe on the server, meaning ServerScriptService or ServerStorage. All scripts that are not on the server can be accessed and manipulated by the client of an exploiter. Having sanity checks and server validation makes handling functions on the client a little easier but not 100% safe.

Important services related to monetization and core game-play will always be server sided, but things like VFX, User Interface, and overall client sided actions involving lerps, tweens, user input, etc. will be handled much smoother on the client and cause the least amount of latency for the server.

2 Likes