How to make shop items go into an inventory (solved)

I’ll give a bit of context. I’m making a game similar to Zo and need some advice on how to approach some things.

So, there’s a store with tabs for each weapon type just like Zo and all that. However instead of being able to equip skins from the shop I want purchased skins to appear in the inventory. How would I make purchased content from each tab go into its respective category in the inventory? For example a sword skin bought from the shop in a sword tab goes into a sword tab in the inventory.

As another person once said in their post, I’m not asking to be spoon fed a copy & paste script. I want to be walked through on possible approaches to doing this.

1 Like

If your items use instances, you can possibly organize them into folders (categories) which can be systematically sorted and stored. Another way is to add an attribute to the item like “Category,” so all items are dumped into the inventory with no sorting, but you do the sorting yourself.

I’ll explain it a bit better. So the shop has 4 categories, 1 for each individual tool. In these categories are skins for tools. There’s also an inventory, with the same setup (4 categories, 1 for each tool). How would I make purchased skins go into the inventory and into the correct category?

One question, are skins bought for one tool or are they just there in your inventory and can be applied to anything in that category?

If they’re for one tool, you can probably assign it in your script that manages it.

So pretty much each category corresponds with a tool. So for example there’s a category for sword skins, and those skins apply to the sword tool only. Then there’s a category for hammer skins, and those skins only apply to the hammer tool, etc. So when the skins are purchased from their category in the shop, they’ll appear in their respective category within the inventory. So say someone bought a sword skin it would appear in a sword category/tab within the inventory.

Sounds quite easy to do if the design is done right.

It depends on how you want to create your system, but ultimately, I’d recommend using an object-oriented system where you can create an object that contains the category:

Category = "Sword"
Type = "Skin"
Item = replicatedStorage.Skins.Rust

These could also simply be data modules that store info about the item.

1 Like

Alrighty, thanks for the help! So would I make a folder for all the skins in replicated storage then have them transfer to a folder inside the custom inventory gui then have it so I that anything in that folder automatically gets added to the inventory gui?

I guess so. I don’t really know too much about the design.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.