Automatic Canvas Size not working

Hi, I have an issue where the contents just go right past the canvas, any fixes?

image

5 Likes

You can put the CanvasSize in: {0, 0},{0.5, 0}

1 Like

Set the ScrollingFrame | Roblox Creator Documentation to be on, it will automatically resize the canvas to hold all the objects

3 Likes

Have tried that, 0 and 1. All do not work.

It’s on Y, always has been and doesn’t work

Is the frames inside the scrollingframe using scale? If so, its scaling to match the size of the canvas size. Not sure why its done like that, but you need to use offset when using scrolling frames with auto canvas size.

I really wish scale would match the size of the frame, not the canvas size.

They are, I’ve put in constraints to stop them from widening, however it seems to affect nothing.image

I think constraints also do scale, so it won’t fix it. I’m not sure if there is any other solution besides use scale. You can use scale in the X, but then the size can get distorted weirdly.

Everything is using scale though.

I have officially given up, would anyone be so kind to help spot a mistake I’ve made and show me the mistake?

https://www.roblox.com/library/7033616994/ScreenGui

1 Like

This is a bug. I made a report about it before.

EDIT: Have you tried clipping descendants?

5 Likes

I have tried that indeed, yes.

1 Like

I’m having this same issue too. Any way to fix this yet? Only way I can activate the scrolling nature of the scrollingframe is by resizing my viewport, but that would be very annoying for the player if they were forced to resize their viewport just to make scrollingframes work.

Edit: found a solution, but it’s a strange workaround. Setting the CanvasSize.Y scale/offset (doesn’t matter which one you choose) to a number larger than the space the contents of the scrollingframe occupy automatically resizes your canvas to the correct dimensions.

Edit 2: Never mind, realised it wasn’t actually resizing it still. Will need to keep testing. This seriously needs to be fixed because it’s driving me insane.

2 Likes

Yeah, I recommend just scripting this part until it’s fixed. Still no solution otherwise.

Are there any open source scripts that can be used to make this work?

Something as simple as a dynamic scrolling text box is impossible to do without programming knowledge thanks to this bug.
image

This may be a bit late, but I was recently experiencing your problem, to fix this set the CanvasSize to 0,0,0,0 and it works!

10 Likes

Sorry to bump in, but I think I’ve found a solution.
Try using UIListLayouts, It worked for me.
A Video

2 Likes

This solution also worked for me after having the same issue. I wanted to use a resizable textLabel but ended up having to switch to a list system. The canvas would resize some but not enough for everything. Hopefully, Roblox fixes this in the future. I have spent a few hours now working on this issue.

1 Like

Had same issue, my objects had UIAspectRatioConstraint, tried deleting it and it worked

6 Likes

The reason it goes past is because of padding. DO NOT set padding to anything other than 0 or it will go out of the scrolling frame. Automatic canvas size does not include the padding in determining the size which makes the frames go out of the scrolling frame. If you want to fix this I suggest you make your own script to do it

8 Likes