Can we Scale a Frame In one Axis based on his content?

I’m building a GUI window That will contain a Random number of attribute to put in it.
Right now i’m trying to see if there is a way to automatically Scale the Window Based on the size of the total size of all the elements.

I’m using a UIListLayout to have multiple rows.

This is what I need Technically :
image

1 Like

Well neverMind, Since there is no component to achieve that I made a Script

If someone need it :

local totalSize = 32
for i = 1, #ContentWindowChilds do
	if ContentWindowChilds[i].Name ~= "UIListLayout" and ContentWindowChilds[i].Name ~= "ContentScript" then
		totalSize = totalSize + ContentWindowChilds[i].Size.Y.Offset + 0.5
	end
end
Label.Size = UDim2.new(0, 258, 0, totalSize)

Sorry to bump, but you can also use automatic size.

Old post, but nope. If you add new elements to a frame, and are using scale like a normal person, then automatic size will mess their sizes as it changes the main frame’s size which affects the scale values.

Thanks for the answer ThePoinball! Wasn’t sure if there was a simpler gui option to fix this but oh well.