How do I fix this issue with the scrolling frame canvas size adjuster

Howdy, so I am trying to create a inventory scrolling frame that contains items, and I ran into an issue;
When over 4 items are added it starts changing the frame’s sizes.


Here is the scrolling’s frame’s properties:

The frame size is 1,0,0.25,0
Here is the roll size readjuster script:

script.Parent.CanvasSize = UDim2.new(0,0,0,script.Parent.UIListLayout.AbsoluteContentSize.Y)

script.Parent.ChildAdded:Connect(function()
	script.Parent.CanvasSize = UDim2.new(0,0,0,script.Parent.UIListLayout.AbsoluteContentSize.Y)
end)
script.Parent.ChildRemoved:Connect(function()
	script.Parent.CanvasSize = UDim2.new(0,0,0,script.Parent.UIListLayout.AbsoluteContentSize.Y)
end)

If anybody could link another forum or a document or directly tell me on how to fix this, I would really appreciate that.

1 Like

[Closed - I figured it out]
Thank you

can u explain how u fixed it cuz uh other ppl might have this problem

1 Like

I replaced the uilistlayout with a uigridlayout and removed the script and set the scrolling’s frame automatic scale to Y

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.