Automatic Canvas Size not working

If you’re using a UIListLayout in your ScrollingFrame (not sure if it works for UIGridLayout), you can put this code in a LocalScript, inside the ScrollingFrame

local Scroller = script.Parent
Scroller.CanvasSize = UDim2.new(0, 0, 0, Scroller.UIListLayout.AbsoluteContentSize.Y)
5 Likes

Hi, today I stumbled upon this problem and I think I’ve found a solution. I know this is quite late, but I’m just posting this in case anyone has the same problem.
For me, this worked: Placing a frame inside the scrolling frame, with its size being {1, 0, 1, 0}. Inside the frame place the elements you would place in the scrolling frame (such as UIGridLayout, UIPadding…).
image

8 Likes

Heya, I had that issue, Remove the UIAspectRatioConstraint if there is in the frame containing the uilistlayout, Set the canvassize to 0,0,0,0 and set the autosize to Y
Hope that fixed it,
(it did for me)

1 Like

Posting this for anyone in the future that might have this problem:

My scrollable GUI that used a UIListLayout was scrolling, but wouldn’t show the last few items. On the UIListLayout, I set HorizontalFlex to either SpaceEvenly or SpaceAround (both worked for me and looked the exact same), and it allowed me to see both the first and last items of the list. Hopefully this might help someone having a similar issue.

5 Likes

The UiAspectRatioConstraint overrides the size of the canvas, keeping it a specific aspect ratio. Deleting it will solve the issue. If you still want to keep the same shape, you just need to put it in the frame parenting the scrollingframe. Sorry this is late, but I hope this helps!

I got this problem too, and I think it is to do with UIAspectRatioConstraint and that instance already has enough bugs with UI and this is another one. UI I am making uses it for boxes and automaticsize doesn’t work?

from what I know, this has only happened to me when using frames with aspect constraint inside them.

Started having this issue, is there a list of objects i have to remove to make this glitch go away i removed a bunch of things but nothing is working :frowning:

Same problem, i have to somehow autoscale it but it doesnt work :frowning:

HOW TO ACTUALLY MAKE IT WORK:

Adjust the canvasSize (y size) of the scrolling frame until the absoluteCanvasSize (y size) of the scrolling frame is set to the number of the height of each gamepass frame + the gap between each game pass frame.

so the absolute size of the scrolling frame should be = 483 x (the number of the gamepass frames) + (the gap between each gap frame)

1 Like

If you use a UIAspectRatioConstraint you might want to change the property AspectType from FitWithMaxSize to ScaleWithParentSize.

This worked for me and might work for you too.
: )

1 Like

For my ScrollingFrame containing a UIListLayout and several Frames with AsectRatios, changing this UIListLayout property to anything other than Automatic made it work:image

2 Likes

UIScale causes an issue with this as well. For any future devs that come across this post, you might wanna delete it and resize your UI until it’s similar to whatever size UIScale was visually restricting it to.