Hi, I'm just wondering whether it is possible to grab the way a Player can place Tools into his backpack by pressing the ` key (left of 1/! key), and using the same way they can store items in their backpack, in a brick which would store them?
Somewhat a locker/storage box, where you can place Tools and later come and pick them up from there?
1. I have a worthy tool in my Backpack, I don't want to lose it in case I die 2. I place the tool into my Storage Box, 3. I die on my adventure, 4. I respawn, I lost everything I had with me, 5. I go to my house, open the Storage Box, 6. I pick up my worthy tool, because I placed it there before going on an adventure.
Not sure if I explained it well enough, if not - Please ask questions :)
Short answer: Yes, it's possible.
Long answer: Depending on how you actually make the interface to drop the tool into it, it could be easier or harder.
Personally, I would make a generic API that handles taking a storing the Tool, and then using the API's functions to connect the interface.
I.E.:
local toolStorage = {} local tools = Instance.new("Folder", game.ServerStorage) tools.Name = "Stored Tools" local module = {} function deepCopy(table) local newTab = {} for i, v in pairs(table) do if type(v) == "table" then newTab[i] = deepCopy(v) else newTab[i] = v end end return newTab end function module.getPlayerStorage(player) if not toolStorage[player] then return {} end return deepCopy(toolStorage[player]) end function module.storeToolForPlayer(player, Tool) if not toolStorage[player] then toolStorage[player] = {} end table.insert(toolStorage[player], Tool) Tool.Parent = tools end function module.retrieveFromStorage(player, Tool) if not toolStorage[player] then error("Player does not own that Tool!") return end for i, v in ipairs(toolStorage[player]) do if v == Tool then table.remove(toolStorage[player], i) Tool.Parent = player.Backpack return end end error("Player does not own that Tool!") end return module
This example only works for a single storage 'container', but you could fairly easily extend it into multiple.