UDim2 not changing

hi, so the folloqwing script:
while wait() do

script.Parent.ScrollingFrame.CanvasSize = UDim2.new({0,0}, {(#script.Parent.ScrollingFrame:GetChildren()) * 0.071428571422,0})

end

show turn my ScrollingFrame’s CanvasSie into {0, 0}, { 1.714285714128, 0}, as there are 24 children of scrolling frame. Yet for some reason it just goes to {0, 0}, {0, 0}. Can someone help?

Setting Udim2 values isn’t formatted as it is in properties. Instead of assigning 2 tables, do it like this.

Udim2.new(ScaleX, OffsetX, ScaleY, OffsetY)

Hope this helped! (:

2 Likes