local / variable
Stores a value.
Syntax
local name = value
Description
local defines a local variable (recommended). Variables defined without local become GLOBAL. No type is specified.
Example
Loading editor…
Expected output
Alex 36
When to use?
Storing all kinds of data.
Common mistakes
- ⚠️ Forgetting local makes the variable global — always use local if possible.