I'm trying to make an FPS game, but my leaderboard (For money) never shows for no reason! Here is the code:
game.Players.PlayerAdded:connect(function(p) local stats = Instance.new("IntValue") stats.Name = ("leaderstats") local money = Instance.new("IntValue") money.Name = "Money" money.Value = 50 money.Parent = stats end)
Thank you in advance :)
Well, you forgot to parent stats
in p
.
There's a second parameter that parents the new instance.
game.Players.PlayerAdded:connect(function(p) local stats = Instance.new("IntValue", p) stats.Name = ("leaderstats") local money = Instance.new("IntValue", stats) money.Name = "Money" money.Value = 50 end)