Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I create a GUI that saves the positions of tools?

Asked by 5 years ago

I want to create a GUI that saves the position tools are in. For example, if I switched an item into the second slot of my backpack, I would want it to be in the same slot when I respawn. My main goal is to save the slot position of items that are in the player's starter pack. I just don't know where to start.

0
Do you even have the GUI inventory system set up? xPolarium 1388 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Well, if you need help starting, I will give you some advice. This answer does not contain code, but it does tell you good starting points. I suggest making a table right when the player dies, and taking the information out when the player respawns. Maybe you could use a For Key, Value doloop to cycle through all the tools and manage the information by storing it in a table. These are just some starting point ideas. Search up tables and storing information and how to use For Key Value do loops on the internet for more information. I hope this helps you. If it doesn't or you want to talk more about it, then comment in the comment section below.

0
just saying, the type of for loop you are using is a generic for loop, typically in form |for k,v in pairs(tbl) do| for dictionaries and |for i,v in ipairs(tbl) do)| for arrays theking48989987 2147 — 5y
Ad

Answer this question