null nil false HealthScript v2.0 local humanoid = script.Parent.Humanoid if (humanoid == nil) then print("ERROR: no humanoid found in 'HealthScript v2.0'") end function CreateGUI() local p = game.Players:GetPlayerFromCharacter(humanoid.Parent) print("Health for Player: " .. p.Name) script.HealthGUI.Parent = p.PlayerGui end function UpdateGUI(health) local pgui = game.Players:GetPlayerFromCharacter(humanoid.Parent).PlayerGui local tray = pgui.HealthGUI.Tray tray.HealthBar.Size = UDim2.new(0.2, 0, 0.8 * (health / humanoid.MaxHealth), 0) tray.HealthBar.Position = UDim2.new(0.4, 0, 0.8 * (1- (health / humanoid.MaxHealth)) , 0) end function HealthChanged(health) UpdateGUI(health) end CreateGUI() humanoid.HealthChanged:connect(HealthChanged) true HealthGUI true false 4285215356 1 4279970357 1 Tray 0.949999988 0 0.380000025 0 0.0450000018 0 0.340000004 0 0 true 1 true false 4294967295 1 4279970357 1 http://{{ request()->getHttpHost() }}/Asset/?id=18441769 ImageLabel 0 0 0.800000012 3 1 0 0.25 0 1 true 1 true false 4286826262 0 4278190080 0 HealthBar 0.420000017 0 0 0 0.159999996 0 0.800000012 0 0 true 2 true false 4289667875 0 4278190080 0 HealthBarBacking 0.419999987 0 0 0 0.159999996 0 0.800000012 0 0 true 1 true