How to stack backpack items (Unsolved)

I wanna make it so that if I have multiple of a certain item It gets auto stacked in your backpack, this is very difficult and I have no idea how to do this (if you do make a script for me then can you make it have a max stack limit of 10?)

Sorry, I’m not going to provide a script for you as it would be long and quite complicated, but heres something you should check out to get started

You can use datastore modules such as ProfileService or create your own datastore system you can save and retrieve data from. Take a look at DatastoreService if you’re going to create your own.
For a backpack system, you’ll need to make your own. For example, at the start of the game, you can get the player’s inventory data from your datastore, and load them all into a backpack gui. To make stacks, you can check if an item has more than one, and you can merge them into one gui. If there are more than 10, tell the script to not make any more.

You might want to start on simpler things and not jump to advanced stuff like datastores.

Dang, I guess having multiple items in my survival game is just gonna be a matter of 900 blocks in the inventory

Check out this video series! It also includes armor for your survival game if you’d like, you have to follow along, since its a 10 part series, but I highly recommend! https://www.youtube.com/watch?v=FITgj35j2bw&list=PLA-sC7NcRycge84JsK_ODxm6mXrSkl89c

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