An inventory shows everything a player owns as a grid of slots they can tap to equip or use. The shape is a ScrollingFrame full of uniform cells laid out by a UIGridLayout, plus a template slot your script clones once per owned item. This guide builds one in Luau and maps to the inventory template in the editor.
1. ScrollingFrame + UIGridLayout for uniform slots
A ScrollingFrame is the scrollable container; a UIGridLayout inside it arranges every child into a uniform grid automatically. Set CellSize and CellPadding once and any number of slots tile correctly.
2. Clone a template slot per item
Build one slot Frame (with a UICorner and an ImageLabel for the icon) and keep it as a template. Clone it for each owned item rather than constructing slots inline — your layout code stays tiny and every slot is identical.
Tip: Use a naming convention like Slot_<itemId> so your scripts can find, equip, or remove slots by id later.
