I’m running into a strange issue with my ScrollingFrame, specifically related to AutomaticCanvasSize (or possibly something else).
My ScrollingFrame is set up with:
AutomaticCanvasSize: Y
CanvasSize:{0,0,0,0}
ScrollingDirection: Y
Here’s the problem:
When I duplicate the item inside the ScrollingFrame a couple of times (2–3 duplicates), AutomaticCanvasSize works perfectly and adjusts to fit all items correctly.
But as I continue duplicating more and more copies, a slight sizing offset starts to appear. Over time, this offset compounds and eventually causes the last item to be pushed completely outside the visible area of the ScrollingFrame.
What’s strange is that the first few duplicates behave correctly, but the more items I add, the worse the gap becomes.
So you mean make the size of the objects within the ScrollingFrame in offset instead of scale, or the scrollingframe it self to offset instead of scale?
I mean the childrens’ size Y needs to be in offset.
But because that is in offset, everything else needs to be in offset.
So you basically have to resize the entire ScrollingFrame into offset (e.g., padding is now in pixels, so is list layout padding) and everything under that ScreenGui. Having everything in pixels actually makes it more scalable and you can use UIScale (instance) and script to scale all the UI
local originalSize = Vector2.new(1200, 800) -- Relative size of the screen you're using to edit the UI in studio
local camera = workspace.CurrentCamera
local uiScale = script.Parent.UIScale
local function update()
local scale = camera.ViewportSize / originalSize
uiScale.Scale = math.min(scale.X, scale.Y)
end
camera:GetPropertyChangedSignal("ViewportSize"):Connect(update)
update()