BorderMode for UIStroke


As a Roblox developer, it is currently too tedious putting together precise UI that uses UIStroke instances. The reason for this is because it lacks a way to control how the stroke is positioned. Since it’s always outside of the parent object, it becomes problematic when using any kind of frame that clips its descendants, like scrolling frames. If developers could set a property like BorderMode on UIStroke instances, this wouldn’t be a headache:

Right now, UIStroke instances technically only have BorderMode.Outline and only one workaround to get something like BorderMode.Middle and BorderMode.Inset. This workaround requires the usage of an invisible frame that’s resized based on the UIStroke’s Thickness. What’s worse is that you even need to adjust the CornerRadius of the UICorner instance (if you used one) based on the Thickness as well:

Here’s what this looks like using a ScrollingFrame, which clips its descendants:


I was thinking about this last year, but I had assumed it was already a feature request. I’m surprised it has taken this long for one to be made about it. It was however mentioned twice (1, 2) on the UIStroke announcement.

If Roblox is able to address this issue, it would improve my development experience because I wouldn’t need to constantly use a tedious workaround to have UI objects with UIStrokes that don’t get clipped.


I also have same issue with ui lists or grids and borders cutting out. It’s tedious wrapping scrollable ui on some other frame that clips descendants and calling it a day.
It’s just inconvinient to do what am i doing to prevent borders cutting out.


this would be very time saving and would definitely make UIs look much prettier and easier to create


Yes, this would be so helpful! Having to make a second smaller frame in any UI that you want to be contained within its bounds is very time-consuming


Would be really nice to have an easier way to do outlines on circular UI elements right now.
Currently the only solution is to have a frame the size of the object plus the outline, with the actual frame inside.


I’m currently stuck with the exact same problem and the solution is really hacky code.

I have a frame has UIStroke and UICorner but if I need to make the BorderMode inset instead of outline I would need to create another frame which is the offset from stroke’s thickness and then change the UICorner to be negative of the stroke’s thickness which ends up with a setup like below

Frame (1, 0, 1, 0)
  UICorner (0.5, 0)
  Frame (1, -10, 1, -10)
    UICorner (0.5, -5)
    UIStroke (0, 5)

This setup is really unintuitive and hard to pull off when having many GuiObjects needing an inset stroke and prevents me from effectively using UIStroke.

If such a simple property is added to combat this it would greatly improve how I use strokes.


Bumping this thread, this is a much needed feature to make UIStroke viable when designing UI.

1 Like

They should also fix the part where it would leave a gap between the Main Frame and UI Stroke.