Frame getting oversized

So, I tried making a Health Bar for my game but it seems that the Frame becomes way too huge.
Here’s the portion of the script I’m having trouble with:

humanoid.HealthChanged:Connect(function()
	
	healthbar.Size = UDim2.new(humanoid.Health/humanoid.MaxHealth,0,1,0)
	
end)

Any help is appreciated!

1 Like

How is your ui set-up?

I just tested the code, and it worked fine. for me

Here’s a screenshot of how the GUI looks:
image_2023-01-15_181342249
image_2023-01-15_181451261

What does it look like then the frame becomes way too huge?

Are you resizing the frame or the text label?

I think the ‘HealthBar’ frame needs to be inside a frame to size right.

Here is how I set it up

Capture

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.