Interesting bug with UIBorder and UIStroke

An interesting thing I discovered today that I figured I’d share.

Turns out, UICorner takes into consideration the size of a UI’s BorderSizePixel, and will resize the UI to be smaller when the border goes inwards.

What’s more, is that UIStroke doesn’t. This makes a strange interaction where you can use uistroke to make a gap between the borders.


^This is normal, no border


^After adding an inset border of 20 (White)


^After adding a UICorner. See how it shrunk?


^After adding a UIStroke of 20. As you can see, the UIStroke object handles the UI as if the inset border wouldn’t effect ui size. This is the same regardless of if it’s set to Border or Contextual.

Interesting conflict, and honestly a pretty cool effect.

Expected behavior

Obviously, I would expect the UICorner to totally negate the border size of the ui, since it’s overriding it.

A private message is associated with this bug report

1 Like

So thats why I had this border spacing issue on my UI.
Not really desired effect, but honestly this reminds me this could become a new feature if they fix it and add size offset of the strokes.
(tho they still lack stroke thickness being a UDim)

1 Like

Agreed, I almost thought to ask for this as a feature request after finding it to be pretty cool

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue, and will come back as soon as we have updates!

Thanks for flagging!

1 Like