I’m making a ui that is supposed to scale with each thing inside of the frame, which on other occasions has worked fine, but this time this ui has a border inside of it and its acting really strange.
It’s supposed to scale with the frame but it isn’t. I’ve tried tinkering with it for a little bit but to no avail. Any ideas?
The layout looks like this with the automatic sized frames being afflictionTab and the Frame within it. The borders size is all 1 for scale with .5 for position and anchoring.
So you mean you want the tabHolder to scale to it’s children?
I think you’ll have to script it because there is no built-in ui part that could do that.
Its pretty simple though, you get the absoluteContent of the UIListLayout, convert that to scaled size, and add that size to the tabHolder size udim2
local UIListContent = path.to.UIListLayout.AbsoluteContentSize.Y
local tabHolder = path.to.tabHolder
local tabParentSize = path.to.scrollingFrame.AbsoluteSize.Y
local YScale = UIListContent / tabParentSize
tabHolder.Size = udim2.new(tabHolder.Size.X.Scale,0,YScale,0)
you might need to also update the position but it should work though, if its offset then I think you can fix it by decrementing the Y Position of tabHolder by the YScale
Oh, my mistake there, so I make this hickup once in a while, check if the image “type/scaling” is set to stretch or to fit? Because if its set to fit, then It’ll only fill up to the X and no longer keep filling (because X is shorter than Y axis), if its set to stretch, then it should fill up to the Y axis.
No worries, i make that mistake too sometimes lol. The border is set to stretch, i just now tried changing the types and it didn’t seem to make much of a difference.