Greetings! I am very close to finishing one of the most requested systems in my game. However, I have one tiny problem.
I already know when setting a table, I can do
table.sort(PlayerRankTable, function(a, b)
return a > b
end)
However, that solution only works for the first part of the table. Not the second part. The first part of the table is the actual player instance. What I want to sort is the value.
Example of the table:
PlayerRankTable = {
BillB1ox = 2,
Player3 = 3,
Player2 = 1,
}
I just want to sort those numbers.
If you can help, that would be great!
Thanks in advance!