So, let’s go over what each script entails:
-Script is the default server script, the script that is most useful, as it conveys changes to all clients instead of simply conveying changes to one. This is the script that you will use most throughout your time as a Roblox developer.
-LocalScripts convey client sided changes, changes that will be visible to the client the script is being executed on only. This means that you only really use them when making UIs and possibly raycasting and the sort. These have access to player cameras, user input (keyboard, mouse, etc.), and stuff that a client takes care of
-ModuleScripts are the stuff in question. For that, think of module scripts as a giant storage room. Module scripts, when created, start with the following lines of code:
local module = {}
return module
You can kind of think of the first line as initializing the storage room, and return is the door. Then, you can define variables like so:
module.Variable = "This is a variable"
You can also define functions:
function module.CoolFunction()
end
So in other words, ModuleScripts can be used both on the client side and the server side, and you should only really use them when you need to take data from somewhere, or you find it more organized to use this sort of method of organization.