-- Variables are global by default: globalVariable = 10 -- To make a variable local: local localVariable = 20 As a result, all Addons have access to the same global variables. r/lua. Lua Variables | Programming tutorial A single name can denote a global variable or a local variable (or a function's formal parameter, which is a particular kind of local variable): var ::= Name Name denotes identifiers, as defined in §2.1. Lua - Variables - Tutorials Point The global variable identifies using only variable names and their values. lua-users wiki: Detecting Undefined Variables The global variable does not need any keyword to declare the name. Instead, you'd just write like this: ]]--variable =--value--[[ Note, you don't always have to even assign a value to a variable.You can use it for the first time and get a value of "nil" which you can update later. I'm having trouble with a simplified commands mod, which is exactly as boring as it sounds. Colorize is complicated. View all global variables. Some functions were called with pcall. global variables Lua - Variables Global variables − All variables are considered global unless explicitly declared as a local. Add a Grepper Answer . Lua