Having trouble with uicorner scaling

I’m currently using udim2 with a text label to scale the size depending on the amount of time required and passed. I have a uicorner attached to the text label and the problem I’m having is the uicorners are almost rectangular whenever they’re very small. Any suggestions or fixes?

1 Like

Unfortunately (at least from my knowledge), this is how UICorners work and cannot be fixed.

Try setting the corner radius to 0.5,0

Or

Setting the parent frame “ClipDescendants” to true

Both of those wouldn’t change anything.

^ Should work and you wouldn’t need UI corner

Here are screenshots using both of your suggestions. It doesn’t help.
image

image

ClipDescendants doesn’t help because the progress bar is still in the bounds of the background bar. It doesn’t appear like it is since the background bar has a UICorner. Delete the UICorner in the background, and you can see the progress bar is still in bounds.

I tested it in studio

It did not work. I thought it would but I guess not

1 Like

The method I use to get around this is using a UIGradient and tween the offset.

Although the UIGradient’s properties need a cut off in transparency:

UIGradient
Transparency:

When I tween the Offset from (-1, 0) to (0, 0)
https://gyazo.com/9d10334351a2d9459c8f049be518a452

1 Like

not sure what you mean by a cut off in transparency

edit: can’t get the label to even show, how do you tween an offset?

By cut off, I meant by how it is in the picture sent above.

The label not showing could be due to the Offset property not with the appropriate Vector2 values.

Lastly, tweening the offset of the UIGradient is just as you’d normally tween a vector 2

local TweenService = game:GetService("TweenService")
TweenService:Create(UIGradient, TweenInfo.new(1), {Offset = Vector2.new(X, Y)}):Play()

-- This isn't limited to tweening, it's you can use a basic Lerp function like:
UIGradient.Offset = Vector2.new(-1, 0):Lerp(Vector2.new(0, 0), alpha)

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