I got 4 text labels.
I've tried this already:

Monies = {}

for _,player in pairs(game.Players:GetPlayers()) do
local money = player.leaderstats:FindFirstChild("Money") 
table.insert(Monies,{player.Name,money.Val})
end

table.sort(Monies)

for _,v in pairs(Monies) do
script.Parent.F.Text = v[1] --Text label 1
script.Parent.S.Text = v[2] --Text label 2
script.Parent.T.Text = v[3] --Text label 3
script.Parent.Fo.Text = v[4] --Text label 4
end

2 comments

0

Please explain what is going wrong, is it in the wrong order? because table.sort sorts them from least to greatest, not greatest to least.

0

That script was wrong in all ways.. it was sorting a table in a table. I want it to sort a table and shown on Gui