Yeah, so i'm wanting to make a remove health bar script and I need a person to check my current one if there are any errors. can someone please help?

  1. game.StarterGui:SetCoreGuiEnabled(1, false)
  2. if game.Players.LocalPlayer then
  3. local lp = game.Players.LocalPlayer
  4. local lpHum = lp.Character.Humanoid
  5. script.Parent.Size = UDim2.new(0, lpHum.MaxHealth*2, 0, 20)
  6. script.Parent.Parent.HealthNotLostFrame.Size = UDim2.new(0, lpHum.Health*2, 0, 20)
  7. lpHum.Changed:connect(function(p)
  8. if p == "Health" then
  9. script.Parent.Parent.HealthNotLostFrame.Size = UDim2.new(0, lpHum.Health*2, 0, 20)
  10.                end
    
  11.      end)
    
  12. end