How to make a single slot

Hello, is it possible to make a single slot. Basically a frame that can carry a tool. This way if I have a tool eqiup system, i can parent the tool into any of the frames, allowing so you can choose what slot you want your tool to be in. I short terms, how do I make a frame able to carry a tool.

Use an array following the logic behind what you just explained.

You could also use a Hash Table

local Hash = {
    Slot = "Tool";
}

What exactly does that do, its just three lines, mind explaining it to me?

I wont code you the entire script needed to solve your problem. I can help you find a solution if you have code, but I wont give you the answer. I gave you a theoretical solution to the problem, its up to you to solve from what I gave.

I will however further elaborate what I mean below:


local Equipped;
local ToolBar = {
Slot_1 = "ToolName";
Slot_2 = "ToolName";
} -- Hash


function SwapTool(Slot)
if(ToolBar[Slot]) then
Equipped = ToolBar[Slot];
end
end

You’re essentially providing pseudo-code which isn’t very detailed.

yeah, i still dont really get it.