Why do you only do logic locally when developing games?

I don’t understand. I’m sure if you use modules in server storage, you’ll be able to block access to the exploits

Most games don’t seem to use server storage when implementing their core logic

I want to know why

well I use serverScriptService for all or most server scripts.

I used to do this to and the main reason why is because

  1. You’re unaware of what ServerStorage is
  2. You don’t see a lot of other people using it
  3. All the tutorials use replicated storage

Infact ServerStorage is whay prevente exploiters from accessing your games code, with the drawback a client cannot access the said code in any way. Replicated Storage is shared by both server and client. For Core logic its best to put scripts in ServerScriptStorage alongside any modules that are only meant to be used by the server, anything else that should be shared should go into ReplicatedStorage, Be mindful of what you put there since exploiters can access any assets inside and read the code openly, Obfuscating it helps preventing code stealing by making the code harder to read and understand.

You should always design the internal systems of a game in such a way where the most work is put on invidiual clients and not the server as to save on the processing power making your games servers less laggy, So stuff like visuals and maybe some simpler logic can be done locally, while physics and other backend stuff on the server.

And to answer the main question, we sometimes move logic to the client to remove strain from the server.

From what I can tell, assuming we ignore the effort required, any logic whose exploitation can be prevented via simpler logic (or simply cannot be exploited) should be done on the client to spread the load from the server.

Furthermore, most of the times, its just easier to put logic on the client if all you want is to quickly make something and ignore the possibility of exploitation.

Only? That’s a strong word.

The main reason not everything is run on the server is because of latency. If you calculate hitboxes on the server, the latency means the client effectively has to aim where their target was a moment before, and that is also before considering where they were in that moment.

1 Like