Question About Local Scripts vs Server Scripts

This question is probably very simple but I seemed to have confused myself with local vs

server.

My question is:

Can separate local scripts read off each other like an example is like if you’re deducting points from a number value in the workspace, since only the local script can read that the server cannot. But since its a local script, i’m wondering if other local scripts can read off it too. It makes sense but i’m second guessing myself.

Further elaborating this ^
local script 1 sets the number value to 5
the server script reads it as 10
but another local script which isn’t local script 1 reads the number value as 5

This would be the case as the value would be changed to 5 for the client, and all LocalScripts run on the client. However you generally wouldn’t want to base any of your code on this, the client is unreliable and can change that value to something other than 5 without the server knowing.

If you’re doing something important that can affect the gameplay, the players stats or other players, it’d be best to communicate with the server via RemoteEvents/RemoteFunctions

Okay thanks
I was originally thinking that separate local scripts would be reading off the server and not from each other, this helps me out a lot thanks! :smiley:

1 Like