Script error occurs but I do not understand why, can someone tell me why this is happening?
Character.Humanoid.Died:Connect(function()
if Character.Humanoid:FindFirstChild("Creator") then
local Creator = Character.Humanoid:FindFirstChild("Creator").Value
if Creator ~= nil then
MaxHealth.Value = MaxHealth.Value - 10
game.Players[Creator].leaderstats.MaxHealth.Value = game.Players[Creator].leaderstats.MaxHealth.Value + 10 -- ( Line that errors )
game.Players[Creator].leaderstats.Kills.Value = game.Players[Creator].leaderstats.Kills.Value + 1
end
end
end)