Recently I’ve been trying to make a case clicker game and I am having issues when wanting to group similar items (In the same table) into different seperate tables. For example I check for data on the client in a folder called “Owned Items” which contains all the items the player owns, but I want to group the same items into seperate tables, so that in the players inventory I can do like x3 of this item. I don’t really know a way to go at this, but I have tried to make different folders with values of how many items their are, but that did not work and it was hard to code.
you can then loop thru the table to sort em like this:
local example = …
for i, v in example do
local amount = v.amount
--[[ other code
like you can clone that value
x amount of times
depending on what v.amount is
]]
end