As more items get added to your inventory, the GUI can expand, and when there’s no more of an item, it can shrink.
In the ScrollingFrame instance, there is a property called AutomaticCanvasSize. If you set this to Y
, then the ScrollingFrame will expand to fit all of the other instances inside of it. You can also use a UIListLayout or a UIGridLayout to help with making a list such as the one in the image.
you can do as @oxzics said but that is a bit buggy in Roblox, a better way to do it is:
local ScrollGUI =
local UIListLayout =
ScrollGUI.ChildAdded:Connect(function(v1)
if v1:IsA("GuiObject") then
ScrollGUI.CanvasSize = UDim2.new(ScrollGUI.CanvasSize.X.Scale, ScrollGUI.CanvasSize.X.Offset, 0, UIListLayout.AbsoluteContentSize.Y)
end
end)
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.