Basically I am trying to make a leaderboard, but here is what I have for it, the problem is it will not show up onto the leaderboard.
01 | local ds = game:GetService( "DataStoreService" ):GetDataStore( "Stats" ) |
02 | game.Players.PlayerAdded:connect( function (np) |
03 | local ls = Instance.new( "BoolValue" ) |
04 | ls.Name = "leaderstats" |
05 | local level = Instance.new( "NumberValue" ) |
06 | level.Name = "Level" |
07 | local xp = Instance.new( "NumberValue" ) |
08 | xp.Name = "XP" |
09 | xp.Parent = ls |
10 | local kills = Instance.new( "NumberValue" ) |
11 | kills.Name = "Kills" |
12 | kills.Parent = ls |
13 | level.Parent = ls |
14 | ls.Parent = np |
15 | kills.Value = 0 |
Thank you in advance.
Not everything the humanoid when they die will be a creator value, so you should've kept the code inside the died event the same (unless you found another error inside of it).
That is all I noticed, if I find anything else I'll edit my answer.