#pairs loop not following table in order

4 messages · Page 1 of 1 (latest)

twin night
#
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```
maiden abyss
#

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?

twin night