It works once, and when you die, it's working on roblox studio but not in roblox player.
local player = game.Players.LocalPlayer local char = player.Character or player.CharacterAdded:wait() local hum = char:WaitForChild("Humanoid") local redzone = hum.MaxHealth/3.8 local greenzone = hum.MaxHealth/1.3 hum.Changed:connect(function() if hum.Health <= redzone then script.Parent.BackgroundColor3 = Color3.new(255, 0 ,0) script.Parent.Parent.Parent.ImageLabel.Visible = true end if hum.Health > redzone then local brickcolor = BrickColor.new("New Yeller") local color = brickcolor.Color script.Parent.BackgroundColor3 = color script.Parent.Parent.Parent.ImageLabel.Visible = false end if hum.Health > greenzone then local brickcolor = BrickColor.new("Lime green") local color = brickcolor.Color script.Parent.BackgroundColor3 = color end script.Parent.Size = UDim2.new(hum.Health / hum.MaxHealth, 0, 0, 20) script.Parent.Parent.TextLabel.Text = math.floor(hum.Health) end)
Just fixed the script, I only removed the player.Character on the variable "char" to fixed it.