Scripts run on the server side while local scripts run on the client side. Say you wanted to make a simple leader-board you would use a normal script. If you were creating a Gui you would use a local script. Local scripts can ONLY be used for the player. Local scripts are for a single player. Scripts are for everyone in the server. Example:
game.Workspace.Baseplate.BrickColor = BrickColor.new("Lime green")
This code on a normal script would change the color of the baseplate to green. If this was a local script it would only change it for the client (Your device). This script would be no different to a normal script because it executes as soon as the player joins so the color would be the same for all players. If I was to add a wait(10) in the code it would wait 10 seconds then change the color. For a player that has been on the server for at least 10 seconds it would be green.
Let me give a better example:
game.Workspace.Baseplate.Touched:connect(function()
game.Workspace.Baseplate.Material = Enum.Material.Slate
end)
This would only execute locally if you used a local script. Remember local scripts can ONLY be used in the player. This means they will not execute in Workspace.
3 comments
local scripts are for your player, server scripts are for all the players
if you have FE enabled then you create a part when a object is touched you are the only one that will see it if you use a localscript, if you use a server script with the same code all players will see it
Thank you for clearing this out for me.