What is the most efficient way to check all tools in a players inventory? Im making a backpack GUI and was wondering what would be the best way to check all tools in a players inventory (including ones that they are currently holding)
make a table of their tools and add whatever they’re holding, if they are.
local tools = plr.Backpack:GetChildren()
local equipped = plr.Character:FindFirstChildOfClass("Tool")
if equipped then
table.insert(tools, equipped)
end
print(tools) --prints a table with every tool
2 Likes
Thank you, I will try this out.