local players = game:GetService("Players")
local Humanoid = script.Parent.Humanoid
function Died()
wait(0.2)
local tag = Humanoid:WaitForChild("creator")
if tag ~= nil and tag.Value ~= nil then
local plr = players:GetChildren(tag.Value)
if plr ~= nil then
local leaderstats = plr:GetChildren("leadertats")
local cash = plr.leaderstats.Cash
local kills = plr.leaderstats.Kills
cash.Value = cash.Value + 0
kills.Value = kills.Value + 1
wait(0.1)
script:remove()
end
end
end
Humanoid.Died:connect(Died)
ERROR : 10: attempt to call a nil value
Thanks for the help! :)
