I wanted to make some of my own custom Admin Commands, and I have run across a problem. When making a give me tool command, the name must be exact to locate the tool you are searching for when using ToolsStorage:FindFirstChild(Name).
However, I have seen some Admin systems use this feature when for example I specify I want to give myself a tool with the name of "n", then the system gave me all tools starting with "n". This is of course impossible with :FindFirstChild(Name), so I am asking if someone could help me out.
local ToolStorage = script --change it if needed
local function Tool(Name : string)
local Extract = {}
for _, Tool : Tool in pairs(ToolStorage:GetDescendants()) do
if Tool:IsA("Tool") then
if string.find(Tool.Name, Name) then
table.insert(Extract, Tool)
end
end
end
return Extract
end