Leaderboard
A leaderboard shown on a player's HUD.
For examples on how to use, refer to UIService.
A leaderboard consists of entries (the rows displayed on the UI). Each entry has a key and a score associated with it.
Keys refer to the names of what is being ranked on the leaderboard. You can add Players, Teams, or words (strings) to the leaderboard.
Scores are the number displayed next to each key. The leaderboard entries are automatically ordered by descending scores. The rank of a key is its place.
Functions
Returns the keys of the leaderboard.
Adds a new key to the leaderboard of the given type. You can optionally give the key an initial score, which otherwise defaults to zero.
Removes the key from the leaderboard.
Adds the given amount to the current score of the key.
Subtracts the given amount from the current score of the key.
Sets the score of the key to the given amount.
Returns the current score of the key. Returns nil if the key is not part of the leaderboard.
Returns the key located at the place. Returns nil if there is no key at the place.
clear()
Clears all leaderboard entries.
Last updated