local function getTableName(tbl) for k, v in pairs(_G) do if v == tbl then return k end end return nil end code example
Example: lua in pairs
--Table is the table to iterate through
--Index is the current index
--Value is the value at the current index
for index, value in pairs(table) do
end