I dont really understand variable scopes in Roblox Lua so I would like some help with it. When i create a variable, and then try to use it in Another script, i get a error saying "Unknown global"
Script A
var = 3 * 3 --- I set the variable
Script B
print[var] --- I try to use the variable but i get the error.
I would appreciate an explanation on how the scopes work in Roblox Lua and how i make a variable that i can use on all my scripts. Thanks!

4 comments
I think it worked but im using the _G. variable in a weapon and the weapon just stops working completely when i set the BaseDamage variable to my _G.damage variable
Use a remote event and have a local variable for gun damage,pass the damage over from client to server and then you can access it
Will you give me some code for that? juist so i understand better. Im currently using a remote event that gives the player "Strength" when shooting the gun. And i guess i could do something similar?
Dm me on discord itll be easier