game.Players.PlayerAdded:connect(function(plr)
local stats = Instance.new("IntValue", game.Workspace)
stats.Name = "leaderstats"
local points = Instance.new("IntValue", stats)
points.Name = "Points"
points.Value = 0
plr.CharacterAdded:connect(function(char)
(char:WaitForChild("Humanoid")).Died:connect(function()
plr.leaderstats.points.Value = plr.leaderstats.points.Value - 1
end)
end)
end)
why does line 9 of this leaderboard script throw an error once humanoid dies???

2 comments
why does this wpork
because I change the parent of the stats.