Aight so, I’m trying to create a warning screen similair to the Airbus ECAM system. I’ve created a simple SurfaceGui, which is a frame that contains a scrolling frame and a UI layout thing. Upon adding new frames, it automatically gets ordered nicely. Now the problem is, I can only add up to 10 of these warnings in the so-called “queue” as going any further goes outside of the bounds of the scrolling frame. I’ve tried increasing the boundaries, however that just resulted in completely breaking the CanvasPosition box, as anything above a scale of 1 causes it to reset to 0, does anyone have an idea on how to solve this?
Are you saying you’re having trouble auto-scaling the canvas? If so, here’s a snippet of code that I use for all of my ScrollingFrames
:
local contentSize = uiListLayout.AbsoluteContentSize.Y
local scale = contentSize / scrollingFrame.AbsoluteSize.Y
scrollingFrame.CanvasSize = UDim2.fromScale(0, scale)
This auto-scales the Y axis. You can edit the code to scale the X axis. Also, you may need to set the AutomaticCanvasSize
property.
If scrollingFrame.AbsoluteSize
doesn’t work, it’s scrollingFrame.AbsoluteCanvasSize
. I cannot check because I am on mobile.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.