Before you equip, just do Character: FindFirstChildOfClass(“Tool”).
That’s your equipped tool. Do it before you equip the new one. That’s your way to get the tool name/ the object itself
How could I use In Pairs, to check if one of them has Equipped == true? (I tried to use GetChildren() on shopModule.gloves, but I guess that’s not how it works)
And get the name. And in the shop module, loop through it, and if the name is equal, change it the equipped to false or the opposite
I am not sure, but here’s an example:
local tool = Character:FindFirstChildOfClass("Tool").Name
for i, v in ipairs(shopModule.gloves) do
If(v["Name"] == tool) then
v["Equipped"] = false
end
end
You can do this then to find out which tool was equipped:
local tool = Backpack:FindFirstChildOfClass("Tool").Name
for i, v in ipairs(shopModule.gloves) do
If(v["Name"] == tool) then
v["Equipped"] = false
end
end