Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I create a gui that lists the top people in server from richest to poorest?

Asked by 8 years ago
Edited 8 years ago

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
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. connor12260311 383 — 8y
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 SmxkePurpp 50 — 8y

Answer this question