I have a generator which I named the humanoid "Generator" And I want this script to make this gui visible when the generator dies.
local z = script.Parent
while true do
wait(5)
if z.Generator.Health == 0 then
game.StarterGui.EndScreen.Frame.Visible = true
end
if z == nil then
game.StarterGui.EndScreen.Frame.Visible = true
end
end
