So I am not getting any errors but the leaderboard is not being shown and the leaderstats folder is not added to the player when they join. Why?
01 | game.Players.PlayerAdded:Connect( function (plyaer) |
02 | local leaderstats = Instance.new( "Folder" ) |
03 | leaderstats.Parent = player |
04 | leaderstats.Name = "leaderstats" |
05 |
06 | local stars = Instance.new( "IntValue" ) |
07 | stars.Parent = leaderstats |
08 | stars.Name = "Stars" |
09 | stars.Value = 0 |
10 | end ) |
Any help would be greatly appreciated
You made a spelling mistake:
01 | game.Players.PlayerAdded:Connect( function (player) -- was "plyaer" |
02 | local leaderstats = Instance.new( "Folder" ) |
03 | leaderstats.Parent = player |
04 | leaderstats.Name = "leaderstats" |
05 |
06 | local stars = Instance.new( "IntValue" ) |
07 | stars.Parent = leaderstats |
08 | stars.Name = "Stars" |
09 | stars.Value = 0 |
10 | end ) |