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?
First off, make sure the script is not disabled. Also, I would make sure you parent the 'Model' and 'CoinValue' to where it needs to be before you name it and change the values of it.
game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model") leaderstats.Parent = player --I parented here leaderstats.Name = "leaderstats" --Here, you HAVE to name it leaderstats, not too sure why but you HAVE too ;PP local coin = Instance.new("IntValue") coin.Parent = leaderstats --I parented here coin.Value = 0 coin.Name = "Coins Collected" end)
Hope this helped.