Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make sure that the UIGridLayout AbsoluteContentSize stays the same?

Asked by 3 years ago

I'm trying to make the grid stay the same size if it goes to a new row. The code I've made makes the grid elements go back and forth.

window.TaskBar.OpenPrograms.UIGridLayout.CellSize = UDim2.new(window.TaskBar.OpenPrograms.UIGridLayout.AbsoluteCellCount.Y > 1 and 1/openprograms or 0, window.TaskBar.OpenPrograms.UIGridLayout.AbsoluteCellCount.Y > 1 and ((openprograms*-1)+1) or 160, 0, 22)

This is the code. Its supposed to change the cellsize from the constant size I set if the cell count y property is bigger than 1. It does this, but it will also cause the elements that would go on a new row to go back and forth.

Answer this question