local tableHistory = {}
function assignButtonTexts(desiredTable)
local keyTable = {}
local index = 1
for i, v in pairs(desiredTable) do
if type(v) == "table" then
script.Parent:FindFirstChild(index).Text = i
index += 1
else
script.Parent:FindFirstChild(index).Text = v
end
end
end```
#pairs loop not following table in order
4 messages · Page 1 of 1 (latest)
local currentTable = masterTable
local tableHistory = {}
function assignButtonTexts(desiredTable)
local keyTable = {}
for i, v in pairs(desiredTable) do
if type(v) == "table" then
script.Parent[i].Text = i
else
script.Parent[i].Text = v
end
end
end
try?
i figured it out, i had to use table.sort