I need to do a leader table. This means something like:

Richest: $99999

Middle: $500

Poor: $5

Nick: his money

and I want to sort it who is the richest to who has the least cash. I currently have:

Cash leaderstat, a GUI:

GUI (it's a surface gui)

and a refresh statement: while wait(5) do [for updating every 5 sec)

I need a loop to get the richest. I know how to do a loop for getting players and the index number, but I need to check who's the richest. It would be nice if it already came with DataStores too, but no pressure.

I know it's a kinda hard question, thanks for trying to answer.

Edit: the only thing I have its this gui and this:

while wait(5) do
	for i, v in pairs(game.Players:GetPlayers()) do
		print(i..": "..v)
	end
end

5 comments

0

find which IntValue is the largest (all numbers you are mentioned have to be IntValues)

0

You have to do more of an attempt than just 5 lines

0

but how

0

use OrderedDataStore

0

thanks, but HOW?