I’m trying to make a sort of tab in a ScrollingFrame to display inventory items. The problem is that when i add more items, the tab scales and the items get longer, while i want them to stay the same size.
I want it to that when i add more items, the item templates stay the same size, but tab (a frame) adjusts so more templates can fit in there. How would i achieve that?
well, setting the CellSize (UIgridLayout) to Offset solved my problem, i had the same issue, however, the smaller the screen, the bigger will be ( since it will not resize the
cells)
if you want the scrollframe to be longer you can use this:
local scrollingFrame =script.Parent. -- Your scrollingFrame
local UIgrid= scrollingFrame.AbsoluteCanvasSize.Y -- Y of ScrollingFrame
function UpdatingScrollFrame()
for i, Frames in ipairs(YourScrollingFrame:GetChildren()) do
scrollingFrame.CanvasSize = UDim2.new(0, 0, 0, UIgrid)
end
end
end
if the player grabs some item, it will add to their inventory, then the scrollframe will
expand , also if you remove something, it will resize again