local Player = script.Parent.Parent:WaitForChild("Humanoid")
local Board = script.Parent
local BackFrame = Board.Back
local Frame = BackFrame.Frame
local Bar = Frame.Bar
function ResizeClip(X)
Frame:TweenSize(UDim2.new(X, 0, 1, 0), "Out", "Quad", 0.25, true)
end
function ResizeBarOffset()
ResizeClip(Player.Health/Player.MaxHealth)
end
Player.HealthChanged:Connect(ResizeBarOffset)
This is what happens when I use Scale for the green bar
Hello @AnimeDevotee,
Try the other two things also offset to make everything offset. If it hifts that will be glad for me.
Your Sincerely,
FroschCrafterLP
I struggled to understand what you mean - I assume I have deciphered your message tho; do you mean I should make everything Offset if I am going to make a single thing Offset?
If I make everything Offset then the entire GUI shrinks/enlarges depending on magnification(Zoom)
Descendants are only clipped if they reach the border of the image label. It is always a rectangle. But the frame image you are using is rounded meaning it won’t completely reach the genuine border of the label. That causes things inside the frame to “leak out”.
Ok so you need to use Scale on everything the billboard, background, and healthbar. No offsets unless you need stud offset for height above the players head. This will keep it from resizing to large when you are away from it. I have also included the way to resize the bar you can change this into a tween if you like.
Example is:
Billboard size {5, 0},{3, 0}
Background size {0.95, 0},{0.2, 0}
HealthBar size {0.95, 0},{0.2, 0}
This Bar uses clip descendants, positioning and Image Labels.
If you disable the loop in the local script you can set the value manually to see it work. Something like this may work for you.