I use the bracket operator because it also works with names that contain whitespaces. i.e TemporarySaveTable.GUI Scale doesn’t work. But again, opinions are subjective, so whatever floats your boat.
Also, if your table has multiple levels, you can use a recursive function:
local function RecursiveSearch(aTable)
for key, value in pairs(aTable) do --unordered search
if(type(value) == "table") do
RecursiveSearch(value)
else
--Do something with this.
end
end
end
Ok, I will keep that in mind thanks. I am newer to tables and working with them, I’ve only started coding a year ago and I should have probably started with tables!