I want to know when to use either of the two scripts, but I don't know the difference between them so I don't wanna mess up.
I will just copy another guy's answer:
" - Script: This runs Server-Sided, (On The Server). This uses Server-Sided events and properties.
LocalScript: This runs Client-Sided, (On Your Computer). This uses Client-Sided events and properties such as getting the player with game.Players.LocalPlayer
or getting the camera/mouse.
ModuleScript: This is a bit different but it's similar to Script except for:
1) Doesn't run the code the instant the game is started, only when calling require.
2) You can make a Function in ModuleScript and use it multiple times in multiple other scripts.
Don't be afraid to look at the wiki for even better answers! "
------------------ alphawolvess
Localscripts deal with client side related things. For example: If you spawned a part with a localscript, it would only replicated/show to the client only. A way around this is to fire Remote Events, these can be read only by the server scripts.
Serverscripts deal with server related things. Everything you do in a serverscript will replicated/show to ALL clients. You can use these to read Remote Events being fired.
It's really that simple, there's a tiny bit more; some stuff on the server cannot be read on the client, (PlayerGui stuff for example). That's really it!
(I suggest looking at the developer post here for more info on Remote Events. https://developer.roblox.com/articles/Remote-Functions-and-Events)
Marked as Duplicate by User#24403
This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.
Why was this question closed?