Hello! I have this script that works but theres 1 problem.. i want to add more words like for example "Carrot" but if i add it next to the "Flamingo" search word it just like doesnt work..
local carrot = script.Parent.Parent.Carrot
local flam = script.Parent.Parent.Flamingo
local Glass = script.Parent.glass
local search = script.Parent.SearchBar
local mu = game.Workspace.MenuSound
--Search system
Glass.MouseButton1Click:Connect(function()
if search.Text == "Flamingo" then
flam.Visible = true
else
search.Text = "No results found.."
end
end)
Glass.MouseButton1Click:Connect(function()
if search.Text == "Flamingo" then
mu.Volume = .20
wait(.01)
mu.Volume = .15
wait(.01)
mu.Volume = .10
wait(.01)
mu.Volume = .05
wait(.01)
wait(.01)
mu.Volume = 0
wait(.01)
mu.Playing = false
else
mu.Playing = true
end
end)
Any Improvemnts or tips are welcome!

5 comments
you could say or search.Text == "Carrot" after the Flamingo, and put a then
but how bc it just doesnt work with a ,
you dont need a comma, you would just do if search.Text == "Flamingo" or search.Text == "Carrot" then
oo let me try it
ok so i think that works.. but now i need the word "Carrot" to make a other gui visible