Hi @weakroblox35 thanks for the report!
I think I understand the issue you’re running into and I believe that this is correct functionality. From what I understand you’re trying to create a UI element that contains multiple smaller frames laid out horizontally in a dynamic fashion. My understanding (and please correct me if I’m misunderstanding something here) is that you are accomplishing this with a parent Frame element (or any GuiObject) with a UIListLayout underneath it. This UIListLayout has its FillDirection set to Horizontal and its HorizontalFlex set to anything other than None.
When using an UiListLayout Flex on any Frame(or GuiObject), its children will bypass any boundaries and clip through them, this should not happen, should it ever be intentional and is not very ui-friendly.
Here It’s a little unclear to me if you are dealing with a child “bypassing” or overflowing over its parent’s boundaries, or clipping (which is what the image you linked looks like you are dealing with). If your parent Frame’s ClipsDescendants property is set to True, than the children should be “clipped” or cut to fit within the parent element’s boundaries. If it is set to False, then the child element will overflow over the parent’s boundaries. From the photo it seems like you have this property set to true and the behavior is correctly “clipping” the child element.
Wraps seems to semi-fix the issue but the fourth element seems to disappear or go below the viewable point.
This is also the correct functionality of wraps. With wraps set to True, any child element that causes the total width of the contents to exceed the width of the parent frame will go to the next row. Then depending on the height of the parent frame, the height of the child element, and if you have ClipsDescendant set to True in this parent element, this element will either be rendered in the row below clipped (as it seems its doing in your case), overflowing (when ClipsDescendant is set to False), or rendered completely if it fits within the parent frame.
But this is not very practical, since the ui is meant for horizontal scrolling not vertical.
If you are looking to create a horizontal scrolling UI, then I think using a parent Frame/GuiObject is not the best way to accomplish that. Maybe instead try using ScrollingFrames.
This example uses a ScrollingFrame with a ScrollingDirection and AutomaticCanvasSize set to X. It also has a UIListLayout underneath it with a FillDirection of Horizontal.
If this is completely off the mark as to your bug, I’d definitely appreciate more context and the placefile so I can get a better understanding for whats going wrong.