Something is wrong with this script bc when I die the money is given and not when the zombie dies. It is a 1 player game. This is a local script
local player = game.Players
local zombie = script.Parent.Zombie
if zombie.health >=("0")
then player.RealMoney.Value = player.RealMoney.Value + 10
else player.RealMoney.Value = player.RealMoney.Value + 0
end

1 comment
Please read this https://developer.roblox.com/en-us/api-reference/event/Humanoid/Died