xxxxxxxxxx
-- Nil (no value)
-- Number => Example: 1234567890
-- String => Example: "random text"
-- Function
-- Userdata
-- Boolean (true/fanse)
-- Table
-- Thread
xxxxxxxxxx
local NumberVariable = 1
local StringVariable = "TextHere"
local BooleanVariable = true --// can also do false
xxxxxxxxxx
-- Variables are global by default:
globalVariable = 10
-- To make a variable local:
local localVariable = 20
xxxxxxxxxx
--[[
Global variables don't need a declaration like "local." 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.
]]--
xxxxxxxxxx
Get all basics about lua variable, the "YT video has sections" so you can
Skip to the part you want.
https://www.youtube.com/watch?v=oxNzUqOSSVw
1:18 Declaring Variable
3:08 Value Types in Lua.
4:04 Variable Naming Rules.