I would like to create a leaderboard that shows only the players in the current server currency
How could I sort this from either highest to lowest or lowest to highest
(i’ve never created a global or server leaderboard so i need a helping start)
I would like to create a leaderboard that shows only the players in the current server currency
How could I sort this from either highest to lowest or lowest to highest
(i’ve never created a global or server leaderboard so i need a helping start)
you could try implementing this pseudocode or use my Top Donators leaderboard as a reference
local playersCurrency: {Player: number} = getPlayersCurrency() -- e.g { player = 0 }
sortTable(playersCurrency) -- descending order (highest to lowest) or ascending order (lowest to highest)
for player: Player, amount: number in playersCurrency do
-- render/show it
end