I was using 2 different methods to automatically size a ScrollingFrame’s canvas size but both methods are now broken. I tried using the AutoCanvasSize
property set to Y previously, and the Grid:GetPropertyChangedSignal("AbsoluteContentSize")
method if that didn’t work. Now, neither are correctly resizing the CanvasSize and I can’t figure out why.
This is set up to handle 100 ranks for a global leaderboard but it gets cut off at 86 because it doesn’t resize properly. I also added a print inside the event and it doesn’t print.
Full code:
for _, Child in pairs(script.Parent:GetChildren()) do
if Child:IsA('Script') then
continue
end
local LayoutFrame = Child.Leaderboard.LayoutFrame
local Grid = LayoutFrame.UIGridLayout
Grid:GetPropertyChangedSignal('AbsoluteContentSize'):Connect(function()
print('hi')
LayoutFrame.CanvasSize = UDim2.fromOffset(0, Grid.AbsoluteContentSize.Y)
end)
end
All boards are set up the same as the Time
board.