I kinda know some of the differences, like scripts and for the server and local scripts are for the client. But are there more differences?
I'll try to give a brief explanation of each:
A LocalScript
is a script that is used to control what happens on the client side
, basically what the person in front
of the screen
sees individually
, it does not show for all other people
playing the game in the same server.
Let us say for example
a player walks to a shop, you want the shop to show for that player and just that player, nobody else. Anything that is modified
by a localscript in a FilteringEnabled
on place does not affect
the server
.
Another example
could be if you create a part
and place it in workspace
through a specific player's localscript, that part is only visible to that player, not anybody else.
Now a ServerScript
is a script that controls the server side, which is seen by all the people in the current server, so lets say a car
is spawned
, you wouldn't choose to do that locally
because then you'd see a character floating
around the map. For all players to see the car, it has to be spawned by a serverscript
.
In simple words, think of serverscripts
as the real world outside our houses
, we see the buildings, roads, mountains, etc, this is a serverscript. However we do not see what is inside
a house, that is being witnessed by someone else
who lives in that house (person behind the screen), this is a localscript
.
Hope my explanation helped you understand a bit better, please let me know if you have any questions!