I Want to make a search bar for searching item assets
Problem is script can’t find it only finds when i typed whole word
function SearchInventory()
local search = string.lower(SearchBox.Text)
for i,item in ipairs(Assets.Weapon:GetChildren()) do
local search = string.lower(SearchBox.Text)
if item:IsA("Folder") then
if search ~= "" then
local item = string.lower(tostring(item.Name))
if string.find(item, search) then
warn("a1")
else
warn("a2")
end
else
warn("a3")
end
end
end
end
SearchBox:GetPropertyChangedSignal("Text"):Connect(function() SearchInventory() end)
function SearchInventory()
local search = string.lower(SearchBox.Text)
for i,item in ipairs(Assets.Weapon:GetChildren()) do
local search = string.lower(SearchBox.Text)
if item:IsA("Folder") then
if search ~= "" then
local item2 = string.lower(tostring(item.Name))
if string.find(search, item2) then
warn("a1")
else
warn("a2")
end
else
warn("a3")
end
end
end