local Humanoid = script.Parent.Humanoid
function died()
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.ShadowCoin.Value = leaderstats.ShadowCoin.Value +10
wait(0.1)
script:Remove()
end
end
end
end
Humanoid.Died:Connect(died)
That’s the script and well when I kill one of my ai nothing happens to my cash (ShadowCoin) anything wrong with the script any help appreciated
No Errors
The Character Is Just My Humanoid The Other Scripts In It Are Not Relavant As The Same Result Happens With An Empty Rig.
I Use a Sword Tool I Made To Kill It
It Takes Damage and Dies Just Does not give cash
we Don’t have much work so we can’t understand wut about just putting a value on the NPC and when hit it will put player name and when it dies it will fire a Remote event Which gives them the money.
I Got The Value Thing Working The Players User Goes Onto the String Value But the Second part Not so much. Showed you the scripts with names and what the explorer looks like. Please Help If they is anymore images you need just ask