How would i make the tf2 healthbar?

Shouldn’t you be doing X offset instead? Anyway, start from Humanoid.Health / Humanoid.MaxHealth and go from there. If it does not work, try what I said above by making it negative or 0 minus formula

oops I’m late

1 Like
local uig = script.Parent

local function UpdateHealthbar()

uig.Offset.Y = Vector2.new(0,Humanoid.Health/Humanoid.MaxHealth * -1)

end
1 Like

It should be Offset, not Offset.Y if you’re doing Vector2.

2 Likes

Oh right, I completely forgot. Here:

local uig = script.Parent

local function UpdateHealthbar()

uig.Offset = Vector2.new(0,Humanoid.Health/Humanoid.MaxHealth * -1)

end
2 Likes

less go it worked ima work on the minor details here now thx for all the help to both of you guys

2 Likes

Screen Shot 2022-07-23 at 8.42.48 PM
looks not bad B))))

Don’t forget to mark @STORMGAMESYT7IP’s answer as the solution so that people could discover it faster.

2 Likes