FANDOM


Not to be confused with Player list, as well as the discontinued feature on game details page that utilized player points.
CurrentPlayList

The current player list that shows the stats of all players.

In Roblox, a leaderboard is a display of players' stats. Leaderboard stats often included KOs/WOs, currency, level and EXP, time played and round survived. A leaderboard is created by placing a value named "leaderstats" inside of a player, and then by placing values inside of that.

Creating a Leaderboard

The following example creates a leaderstat called "Money" and sets the default value to 100. This should be located in a ExplorerImageIndex 6Script in ExplorerImageIndex 71ServerScriptService or ExplorerImageIndex 19Workspace.

game.Players.PlayerAdded:Connect(function(plr)
    local ls = Instance.new("Model")
    ls.Name = "leaderstats"
    ls.Parent = plr
 
    local m = Instance.new("IntValue")
    m.Name = "Money"
    m.Value = 100
    m.Parent = ls
end)

Resulting Tree

  • Tree-collapse
    ExplorerImageIndex 12
    PlayerName
    • Tree-collapse
      ExplorerImageIndex 2
      leaderstats
      • ExplorerImageIndex 4
        Money
    • Other objects not shown

Changing a leaderstat is as simple as changing the value of the IntValue created.

game.Players.PlayerName.leaderstats.Money.Value = game.Players.PlayerName.leaderstats.Money.Value + 10

Gallery

Community content is available under CC-BY-SA unless otherwise noted.