Why isn't my script getting the absolute content size of a UI constraint properly?

So I am making a debug console for moderators in my game who do not have direct access to the developer console made by Roblox. It is working for the most part except for this part here:

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

For some reason, it doesn’t fit all of the text labels in the scrolling frame, and it ends up setting the canvas size to random offset values like shown here:

image
image

Is there a solution for this?

If the contents are sized by scale then it will exponentially increase the Absolute content size, Change anything with its size in scale in the the scrolling frame and this issue should likely go away…

1 Like