Hello!
I am making a crafting system where If you have 5 of the same certain Items (Example: Sticks) then you can create something else, like a sword or something, the problem Is that I don't know how to check It the player has more than 1 certain Item for It to be crafted
local function getChildrenNamed(name, amount, parent) local children = {} local childrenLeft = amount for _, child in parent:GetChildren() do if child.Name == name then table.insert(children, child) childrenLeft -= 1 if childrenLeft == 0 then break end end end return #children == amount, children end -- ... local gotAll, children = getChildrenNamed("Sticks", 5, backpack) if gotAll then -- Delete children, yada-yada end