So, I'm currently learning about Leader boards. I've read so far the whole wiki page, but now that I did what their script says, nothing appears. Here's the script:
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "Points"
leaderstats.Parent = player
local coin = Instance.new("IntValue")
coin.Value = 0
coin.Name = "Coins Collected"
coin.Parent = leaderstats
end)
Any ideas as to why nothing is appearing? All help is appreciated!
[EDIT PART]
So I've noticed that ROBLOX's script work's fine:
game.Players.PlayerAdded:connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local money = Instance.new("IntValue")
money.Name = "Money"
money.Value = 0
money.Parent = leaderstats
end)
What's the difference between my script, and theirs?

1 comment
Ahh ok, the reason why is because when naming the 'leaderstats' variable, it HAS to have the name of 'leaderstats'.