AbsoluteContentSize / CamvasSize going CRAZY

  1. What do you want to achieve? Keep it simple and clear!

I want my scrolling frame to change its canvas to the “AbsoluteCotnentSize” amount once it changes?.

  1. What is the issue? Include screenshots / videos if possible!

My issue is that. When a new frame gets added to my Scrolling Frame the canvas size goes crazy… Here a small clip showing you what i mean(Testing here)

Also. Heres my code im using to test:


	script.Parent.CanvasSize = UDim2.new(script.Parent.UIListLayout.AbsoluteContentSize.X, 0, script.Parent.UIListLayout.AbsoluteContentSize.Y, 0)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have been looking at the dev forum, scripting helpers + Youtube. But i cant seem to find a solution for my problem… Any help would be really appreciated. Because i have been having this problem for a while now :grinning: :grinning:

with udim2 its (scaleX,sizeX,scaleY,sizeY)
absolutecanvassize returns a vector2 in size.
not in scale

however, scrolling frames have a property called “AutomaticCanvasSize”
try using that instead

1 Like

Ok i’ll try that out and see what happens

No that didnt seem to work either. Sorry for the late response by the way

1 Like

idk what u tried but either on of these is the awnser


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

Fixed it. Had to replace the “UILIstLayout” with a grid layout instead after turning on “AutomaticCanvasSize”. Thanks for the help(:!!