local TextBox = script.Parent.SearchBar
TextBox:GetPropertyChangedSignal("Text"):Connect(function()
local items = script.Parent.Items
for _,v in pairs(items:GetChildren()) do
local lower = string.lower(TextBox.Text)
local loweritem = string.lower(v.Name)
if string.match(loweritem,lower) then
if script.Parent.Text == "" or script.Parent.Text == " " then
-- means that theres no text inside the box
else
-- the text matchs the item name-
end
end
end
end)
1 Like