--LOCAL--
local p = script.Parent.Parent.Parent.Parent.Parent.Name
local Camera = game.Workspace.CurrentCamera
--MAIN--
script.Parent.MouseButton1Click:Connect(function()
Camera.CameraType="Custom"
game.Players[p].TeamColor = BrickColor.new("Really black")
game.Workspace[p].Humanoid.Health = 0
script.Parent.Parent.Parent.Enabled = false
script.Parent.Parent.Parent.Parent.health.white.Visible=true
script.Parent.Parent.Parent.Parent.health.white.red.Visible=true
script.Parent.Parent.Parent.Parent.health.white.red.green.Visible=true
end)
When I die this script will not work since it only works on the main menu. So when I die the health bar will disappear. I try to make ResetOnSpawn false but it will keep the health bar red condition after I die. Any one know how to do it?

2 comments
there is an Humanoid.HealthChanged event especifically using Change event in Health - https://developer.roblox.com/en-us/api-reference/event/Humanoid/HealthChanged
Right.