So, I’m tryna cycle through a table, but want it to loop through the table in the order that I placed the titles. I’ll place a screenshot and my code below
local creditsTable = {
["Community Directors"] = {
310680623,
525872854,
},
["Development Directors"] = {
109708502,
168250866,
},
["Administration Directors"] = {
78630005,
142099293
}
}
local creditsText = ""
for title, titleTable in pairs(creditsTable) do
if title == "Community Directors" then
creditsText = creditsText .. "<b>" .. title .. "</b>"
else
creditsText = creditsText .. "\n\n<b>" .. title .. "</b>"
end
local info = userService:GetUserInfosByUserIdsAsync(titleTable)
for _, UserInfo in ipairs(info) do
creditsText = creditsText .. "\n" .. UserInfo.DisplayName .. "\n<b>(@" .. UserInfo.Username .. ")</b>"
end
end
creditsHolder.CreditsText.Text = creditsText