RPG Inventory System

Hello, I need help creating an RPG type inventory system and I’m confused on what to do or where to start. I made a basic IU layout (named slot1 - slot35) and I made a item module which contains things like the amount you will get, the Image for the item, the name of the item etc.


I want to create a system when you click an item it sends it to the first slot in the inventory (or the next if an item is in that slot it duplicated the template which has the item amount, image and name). I also want to make a system which allows you to drag items around in your inventory but if it goes off the inventory and the user lets go then it goes back to its original position.

What would be the best way of doing this?

Maybe have a value for each box saying if it is taken or not, so then it cycles through the boxes until it finds the next one one that’s empty.

are these obtained from shops or caves

what do you mean? the player picks them up and it goes to the inventory

1 Like

oh like that ok nvm them because if it was from shop u could do what i am doing just put up a equip option in shop for items that u already buyed

what would you say the best way to make a pickup function be?

in this case u can put up a table or a dictionary inside a module script like
module.slots = {
1 = “item name”
2 = true

} if its not taken keep it true

I’d use E key on hover, or just click when you touch it when equipped as a tool.

I have e set to another item for my game so f is the second option.