I've been trying for days to get this kill for money script. I've basically tried almost everything i could think of like put the script into the zombie humanoid leave it out of the zombie.I really don't know what to do at this point so i came here to see if anybody can help me with it.
local Humanoid = script.Parent.Zombie
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.Cash.Value = Leaderstats.Cash.Value + 7 --Change Money to the stat that is increased.
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)
(by the way i'm making a zombie game if you can't already tell)

2 comments
Please use code blocks (The blue button on the right side of the top left icons (B, i, >, globe, C, Lua)).
oh mb