this is the script I think it should work fine

local char = script.Parent
local healthGui = char.Head.HealthGui
local humanoid = char.Humanoid

humanoid:GetPropertyChangedSignal("Health"):Connect(function()
	local healthChange = humanoid.Health/humanoid.MaxHealth
	local healthColor = Color3.fromRGB(255,0,0):Lerp(Color3.fromRGB(60,255,0),healthChange)
	healthGui.Health.Meter:TweenSize(UDim2.new(healthChange,0,1,0),"In","Linear",1)
	healthGui.Health.Meter.BackgroundColor3 = healthColor
end)

everything is in place

5 comments

0

the code looks good, is Linea spelled the same way in your code, or is it Linear? b/c its suppose to be spelled Linear

0

This should work fine, I have tested your code, are you sure that you have tested on both the server and the client? Does it successfully show up or not?

0

i have tested but the health isnt changing

0

remeber its for a boat

0

The GUI shows up exept when i shoot it i see the humanoid health go down but not the gui health