local Humanoid = script.Parent.Humanoid
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
if tag ~= nil then
if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
Leaderstats.Coins.Value = Leaderstats.Coins.Value + 10 --how much you get for killing the npc
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)
theres no error in output (atleast of what i saw). My leaderstats name is the same, so is coins.
