01 | game.Players.PlayerAdded:connect( function (char) |
02 | local leaderstats = Instance.new( "Model" ) |
03 | leaderstats.Name = "Leaderstats" |
04 | leaderstats.Parent = char |
05 |
06 | local money = Instance.new( "IntValue" ) |
07 | money.Name = "Money" |
08 | money.Value = 0 |
09 | money.Parent = leaderstats |
10 |
11 | end ) |
The name of the leaderstat should be leaderstats
, not Leaderstats
.
01 | --// Also, remember that the player added event returns the player, not the character. |
02 | game.Players.PlayerAdded:connect( function (char) |
03 | local leaderstats = Instance.new( "Model" ) |
04 | leaderstats.Name = "leaderstats" |
05 | leaderstats.Parent = char |
06 |
07 | local money = Instance.new( "IntValue" ) |
08 | money.Name = "Money" |
09 | money.Value = 0 |
10 | money.Parent = leaderstats |
11 |
12 | end ) |