This script works when the zombie named "Humanoid" dies and Money is given to the player. The script only works one, eg when I kill the zombie money is given, but when I kill the zombie again the script doesn't work.
I need this script to loop,
local Humanoid = game.Workspace.Humanoid
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
Humanoid:WaitForChild("Zombie").Died:Connect(function()
player.RealMoney.Value = player.RealMoney.Value + 1000
end)
end)
end)

2 comments
Is this for a local script in serverscriptsevice or not?
this is a zombie i think