This is the lesson that unlocks every game with points. Roblox has a built-in scoreboard, that little list in the top-right corner, and it shows up the moment you create a folder with one exact magic name: leaderstats. Spell it any other way and nothing appears, so that name is the one detail to get perfect.
The plan uses everything you’ve built. When a player joins, you make them a leaderstats folder, drop a stat value inside, and Roblox does the displaying for free.
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder")
stats.Name = "leaderstats"
stats.Parent = player
local coins = Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = 0
coins.Parent = stats
end)
Two new tools here. Instance.new("Folder") creates an object from code instead of by hand in the Explorer, which is how you make things for players who don’t exist yet when you write the script. And PlayerAdded is an event, just like Touched, that fires once for each player who joins, handing you that player so you can give them their own stats.
An IntValue holds a whole number, perfect for coins or score. Run the checklist, press Play, and when “Coins” shows up next to your name, you’ve built the backbone of a tycoon.