I am expanding on my custom admin, my aim is to add command suggestions so when you begin typing it returns commands relevant to the textbox text. However I can only return 1 string when I want Multiple. I am in need of a solution that provides what code I should use to solve this issue.
Example: https://gyazo.com/40d720c03c51e56f5fe46a0eaaa6bfa8
local Commands = {"track","kick","ban","view","tban"}
local function findCommand(stringg)
for _, v in pairs(Commands) do
if stringg:lower() == (v:lower()):sub(1, #stringg) then
return v
end
end
end
game.ReplicatedStorage.RemoteFunction.OnServerInvoke = function(plr,text)
local String = findCommand(text)
return String
end
Local Script:
local a = game.ReplicatedStorage.RemoteFunction:InvokeServer(text.Text)
if not script.Parent.List:FindFirstChild(a) then
Clean()
local Template = script.Template:Clone()
Template.Text = a
Template.Parent = script.Parent.List
Template.Name = “Template”
end
