-
What do you want to achieve? scrollingframe that automatically changes canvas size
-
What is the issue? the frames inside the scrollingframe stretch repeatedly
-
What solutions have you tried so far? i looked for solutions on devforum but none of the scripts work
i tried this but the frames inside the scrollingframe stretch repeatedly
local grid = script.Parent:WaitForChild("UIGridLayout")
local scrollingFrame = script.Parent
local function onContentSizeChanged()
local absoluteSize = grid.AbsoluteContentSize
scrollingFrame.CanvasSize = UDim2.new(absoluteSize.X, 0 , absoluteSize.Y, 0)
end
grid:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(onContentSizeChanged)