Saving Tool Order upon Death

Hi, I’ve recently been attempting to figure out how to save the order of tools in the main ROBLOX toolbar upon death. I’ve looked in many different posts on the forum and I cannot seem to find a solution to this problem.

Basically, I own a tool based game involving PvP and other things of the sort that can kill the player. I’ve often received requests to save the order of tools in the main toolbar (the 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 stuff at the bottom of the screen) so players don’t have to go through the process of organization their tools each time they spawned.

Any help would be appreciated.

4 Likes

Probable Solution


The most probable solution would be parenting the first tool to last, which goes in order from 1 to 10. Start setting the tools in ServerStorage and then add a script(or a function) which procedurally adds the tools in the specific order from the player’s tool order.

Unfortunately, I am unable to read the correct order from some testing through client using 5 tools with different names, their order goes scrambled after placing them in other orders:

-- Local Script
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

Humanoid.Died:Connect(function()
	print("Begin!")
	print(unpack(Player.Backpack:GetChildren())) -- 1 2 3 4 5 if not rearranged, otherwise reads a scrambled order
end)

Apparently, you will have to create a system where you’ll customize the order of the tools, which is slightly a hassle to work with. You will set the tools in a numeric order in a table, which then you’ll parent to the player’s backpack.

8 Likes

Thank you for your solution, I’ll attempt this immediately.

2 Likes