Back to blog
Back to blog
Roblox
Add a Points Leaderboard to Your Roblox Game
Give players coins, show their score at the top of the screen and keep the competition friendly.
Leo 30 August 2026 6 min read
Scores make a game exciting. In Roblox a leaderboard is just a folder of values attached to each player, and Roblox draws it on screen for you.
Create the leaderstats folder
lua
1local Players = game:GetService("Players")
2
3Players.PlayerAdded:Connect(function(player)
4 local stats = Instance.new("Folder")
5 stats.Name = "leaderstats"
6 stats.Parent = player
7
8 local coins = Instance.new("IntValue")
9 coins.Name = "Coins"
10 coins.Value = 0
11 coins.Parent = stats
12end)
Give a coin when a player touches a part
lua
1local coin = script.Parent
2
3coin.Touched:Connect(function(hit)
4 local player = game.Players:GetPlayerFromCharacter(hit.Parent)
5 if player then
6 player.leaderstats.Coins.Value += 1
7 coin:Destroy()
8 end
9end)
- Keep coin values small so every pickup feels fair.
- Play a sound on pickup: players love feedback.
- Respawn coins after 10 seconds instead of destroying them forever.
Try it yourself
Build a shop where coins actually buy something.
- 1Create a shop part players can touch.
- 2Check if Coins.Value is 10 or more.
- 3Subtract 10 coins and give the player a speed boost.
- 4Tell the player what happened with a chat message.
Keep going
Roblox
Build Your First Roblox Obby
Plan an obstacle course, add checkpoints and script a disappearing platform in Roblox Studio.
Leo8 Sept 2026 · 7 min
PythonWeb DevRoblox
Ten Coding Projects to Build This Holiday
A project list sorted from easiest to boldest, with a clear finish line for every single one.
Mia15 Jul 2026 · 5 min