I can't find any source to this question, I really need to know the uses of global variables and what they are..
Uses of global variables and what they are?
1 answer
"Unlike global variables, local variables have their scope limited to the block where they are declared. A block is the body of a control structure, the body of a function, or a chunk (the file or string with the code where the variable is declared)." Source
Essentially, if you declare a local variable in a function, if statement, or loop, you can't use that variable anywhere else. If you declare it out of the function, it can be used anywhere in that script. Global variables can be used anywhere, whether they are declared within a function or not.
To declare a local variable:
local variableName = 12
To declare a global variable:
variableName = 12
2 comments
Thank you, I finally got it!
No problem! Good luck on scripting!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
I believe "Globals" is just a fancy way of saying function exampleFunction(). Not 100% sure though.
What did you look up? I searched this site alone (using the search feature) and I could find a lot of questions about this topic. (Note the question I marked this a duplicate of mostly describes local variables and only slightly describes global variables, but global variables are simpler which is why it only slightly describes it).