This is for when the generator dies the parent is destroyed
if script.Parent.Generator.Health <= 0 then script.Parent:Destroy() end
This is because it only runs once, when the server first boots up. You should do:
while true do if script.Parent.Generator.Health <= 0 then script.Parent:Destroy() end wait() end
edit: if someone sees this, the comment's reply is actually the more "correct" answer. try
script.Parent.Generator:GetPropertyChangedSignal("Health"):Connect(function() if script.Parent.Generator.Health <= 0 then script.Parent:Destroy() end end)
this will run more efficiently