Hello, is there any way to change the queueing of the tool in your inventory? Thanks for any reply.
If you want to add them in a certain order, insert them all into a table in the order you want then iterate through the table and add them to a players backpack
Making your own inventory system and changing the queueing of an item is very possible you will just need to know about arrays/tables
I am trying to avoid custom backpacks
Go with his idea, he has the same as me but you don’t need to change the entire backpack
Or you can do it manually in any game with your tools by pressing the ` (backwards single quote) key. It brings up all your tools and you can move the icons wherever you want.
No, that is something I want to avoid too.
If you’re using this solution, you should make sure that you are putting the tools into an array (an array is a type of table which doesn’t have any keys, only indexes; if you’re using table.insert
, it’ll create an array) instead of a dictionairy, and then use ipairs
to iterate over that array.
ipairs
should be used because pairs
isn’t garuanteed to iterate over the table in the order you created it in, and ipairs
isn’t able to iterate over dictionairies, or arrays with gaps in them.