How can i exactly do a efficient inventory system

Hello! im trying to create a inventory system for my game, but how can i exactly make a efficient way? i also want to limit the inventory and it can be expanded

For owned items, I used a bunch of BoolValues. For amount of something, I used IntValues.

For handling the GUI, you probably want a LocalScript and a ModuleScript.

(There are probably more efficient ways)

1 Like

The most efficient way for me means fast and cheap. I would use tables. You know modules are effective and now I’m addicted to them.

local Inventory = {
       Armors = {}
       Swords = {}
       Consumables = {}
       Items = {} --and so on
}

It depends what inventory system do you want. Don’t worry about thinking changing values is hard. That is why we can use module

Inventory:Remove(plr, item)
--or
Player:GiveItems(item, amount)
--anything you wish

I’m saying I can make module like that for free if you want. I also plan inventory for my game so I can help you or we can work together

Client and server replication. Sorting inventory, how much space player have, how much weight he can carry and etc. We are not players, we are developers, everything is customizable. So should we start?

2 Likes