i have a few concepts that i am having trouble understanding. I know it is good practice to not place things in client so as to prevent hacking / cheating.
I am making a zombie game so all the common parameters like health and damage are kept under a folder in workspace. If i understand correctly, workspace belongs to server so people can just change the values?
Initially i kept all the master copies of the zombies and soldiers in ServerStorage. However i see many examples where people use ReplicatedStorage. Is there a reason or it is just a preference? As before, my purpose is to prevent players from editing it.
It shouldn’t matter if exploiters can see these values. You should be using the health and damage values on the server, if you do, then when client changes these values, it is basically like inspect element. They are changing it for them but not anyone else. Things are put in ReplicatedStorage when the client needs to read stuff in there, if the client doesn’t need the stuff there, they can be put in ServerStorage
No they cannot edit value objects under the workspace, because of filtering enabled only the client will see the change, thus if you have the server reading/setting the values it will only have the correct values.
Thanks all for the reply… just to be clear, these are the master copies of npc to be spawned during gameplay. … so i guess the client needs it and it should be in ReplicatedStorage?
As said by people earlier in the thread you use ReplicatedStorage when client needs to read something from it. If you are cloning the NPCs from client side, you will need to store it in ReplicatedStorage, otherwise if everything is handled by the server, you can use Server Storage.
But keep in mind that ReplicatedStorage can be used for both Server & Client Sided Scripts.
The zombies items can be kept where ever you want as long as the health and damage are not controlled by remotes they cannot be changed. Additionally assuming you have guns to damage the zombies the best practice for damaging them with a remote would be to check if they player has a gun on the client and server side to not spam the gun damaging remote.
Yes if you have it simplified enough it can be easily open to hacking like having the damage script fire a remote of the damaged humanoid, but if you were to do cordinates instead or have some kind of anti-exploitable remote instead such as having the raycast being on the server side then no they couldn’t exploit it