Hello, I am trying to create an inventory Ui with a scrolling frame. I am using a UiGridLayout to position all the items correctly, It works fine on PC but when switching to mobile the frames inside the scrolling frame are a different size, How can I fix this so they are the same on all devices?
UIGridLayout has a property called “CellSize”. This one stores a UDim2 value. UDim2 Values are composed of 2 “sections”, the X axis and the Y axis, and each axis has another 2 sections: Scale and Offset.
Scale is like percentages. If you set it to 0.5, it’ll occupy 50% of its parent. However, Offset works with pixels, meaning if set to 50, it’ll occupy 50 pixels.
In the CellSize property you probably used Offset values, which makes this effect.
{0, 0},{0, 0} X Axis, Y Axis
{Scale, Offset}, {Scale, Offset}
This kind of scale-offset system also appears with the padding, so use scale instead of offset on both padding and cell size. Try playing around until they fit.