I was watching other videos but it did not work my currency is named gold pls help! I put this script in the npc.
local Humanoid = script.Parent.Humanoid function Dead() 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 +10 wait(0.1) script:Remove() end end end end Humanoid.Died:Connect(Dead)

1 comment
Does your weapon put Creator value inside NPC after attacking it?