I used this for my leadboard script
function playerAdded() local Id = Instance.new("IntValue") Id.Name = "leaderstats" local points = Instance.new("IntValue",Id) points.Name = "Money" Id.Parent = player end
When I go into a game, it doesn't show? Can I get help?
First of all, make sure you include your parameter, player
, in the parentheses. Your function declaration should look like this.
function playerAdded(player)
Secondly, you didn't connect your function to the PlayerAdded
event. Add this line to the bottom of your script.
Game:GetService("Players").PlayerAdded:connect(playerAdded)
I haven't tested it but I've done it a million times so it SHOULD work.
game.Players.PlayerAdded:connect(function(plr) local Id = Instance.new("IntValue",plr) Id.Name = "leaderstats" local points = Instance.new("NumberValue",Id) points.Name = "Money" points.Value = 0 end)