I am 100% sure you know what is a leaderboard. Like almost every single game in Roblox has one. A leaderboard is a fun way to display player scores or some important statistic in your Roblox game. With Roblox’s default system, it is really so simple to set up. In this tutorial, I will walk you through step by step to create a basic leaderboard using Roblox Studio. The built-in leaderstats feature can easily show each player’s name and score. Let’s get started 🙂
Create the Leaderboard with Default System
Without making any extra User Interface, we can simply use the in-build system of Roblox Studio. You can right-click ServerScriptService in the Explorer. Insert a new Script. Let say just name it LeaderboardScript.

Now you can simply copy and paste below script to the script editor:
local Players = game:GetService("Players")
-- Function to set up leaderstats for each player
Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local score = Instance.new("IntValue")
score.Name = "Score"
score.Value = 0
score.Parent = leaderstats
end)
Explanation of the Script:
You should aware there are some special terms in the script. First, the leaderstats folder is a special Roblox feature that automatically displays player information in the game interface. Whenever a player joins the game, a Score value is created under leaderstats. Since the score.Value set to be ZERO, it will starting at 0. For sure you can change this value according to your wish. And you can test it out!
Noted that the default system shows the leaderboard on the right side of the screen. Only start playing the Roblox game will see it appear.
Create function to handle Add Points
Now you can make a new function called addPoints. With the help of this function, player will increase the score by completing some tasks. We will call this function later. Now just add below script in the same file:
-- Function to add points
local function addPoints(player, points)
if player:FindFirstChild("leaderstats") then
player.leaderstats.Score.Value = player.leaderstats.Score.Value + points
end
end
Trigger the addPoints function at the beginning
The simplest way to test it out, is how we trigger the function when players entering the game. That is the function being called and add 12 score when the game started.
-- Example: Add 100 points when a player joins
Players.PlayerAdded:Connect(function(player)
wait(1) -- Brief delay to ensure leaderstats is created
addPoints(player, 12)
end)
Test by playing the game
When you actually start PLAY the game in Roblox studio, you should now notice that there is a simple leaderboard at the top right hand corner. The initial value should be 12.

You can surely further modify the script, or adding some parts there for clicking and add points purpose. Hope this simple tutorial help you create the very first simple leaderboard in Roblox.