ScrollingFrame issue

Basically, I keep player’s history inside a ScrollingFrame, but it can only fit 20 TextButtons at the moment before reacing the end of the scrolling.
How can I make the scrolling “longer”?

I want to fit at least 150-200 TextButtons inside.

You can make the scrolling “longer” by changing the Canvas Size of the Scrolling Frame.

That didn’t work in my case, however I made an example that would adjust it when a child is added / removed:

local HistoryFrame = script.Parent
local List = HistoryFrame:WaitForChild('UIListLayout')


local function Resize
()
	HistoryFrame.CanvasSize = UDim2.new(0, 0, 0, List.AbsoluteContentSize.Y)
end


HistoryFrame.ChildAdded:Connect(Resize)
HistoryFrame.ChildRemoved:Connect(Resize)

Edit, nevermind, the buttons seems to get bigger for whatever reason when I add multiple buttons inside…