Ok so the title doesn’t really describe it all but what I want my tool to do is to be able to detect all the tools a player has (done) and then pick a random tool
local Tool = script.Parent
Tool.Activated:Connect(function()
local Char = script.Parent.Parent
local Player = game.Players:FindFirstChild(Char.Name)
local tools = Player.Backpack:GetChildren()
local equipped = Player.Character:FindFirstChildOfClass("Tool")
if equipped then
table.insert(tools, equipped)
end
print(tools)
end)
I don’t know how to pick a random tool from the table though