What can global variables do that local variables can’t do?
The major difference is their scope, where they can be accessed.
To explain that I had written a nice small guide for you when I suddenly lost the reply tab, no clue why. I’m not re-typing it but this is probably better anyway : http://lua-users.org/wiki/ScopeTutorial
So, would using a lot of global variables, cause lag?
No, it’s just shitty optimization.
You usually only want to create global variables if they are going to be used often by multiple things.
Thanks, for the link and the attempt on the guide.
Have to learn at some point.