Frame with automatic size breaks children's size?

so I’m trying to make a UI that contains a scrolling frame, and within that scrolling frame I have frames that contain children that will be loaded automatically, such as items, hats and clothes, gears, etc. what I want to happen is I put an item into the frame, the frame automatically scales it’s own size to fit the new item, then the scrolling frame automatically scales it’s own size to fit the new size of the frames.

image

expected result when 3 items are in frame within scrolling frame
image

however what I’m finding is instead the children scales itself somehow to fit the new size of it’s parent, which causes everything to stretch.

image

1 child was added and UIGridLayout changed the size of the Y of parent
image

is there a fix to this?

1 Like

There is most likely a property of either one of your constraints that is causing this to happen, but you might also want to consider using UIAspectRatioConstraints in your TemplateFrames. Set the value AspectRatio to 1.5 or so, and it will cause them to stay a consistent scale.

well at least it stops it from stretching… but now the spacing is all messed up and gets worse as more rows are added
image
image

it’s normal when there’s 2 or less rows
image

UIAspectRatioConstraint is the only constraint in the template
image

I’m assuming the spacing from the UIGridLayout is based on what would be the size of the ui when it stretches?