Before I begin, please, when you have the time, review this article.
Now, to begin:
Line 3 is your problem: they're not saying if the value is not equal to [blank] then execute, else if [blank-space] is true then execute.
For every time you want to check a value, you can't do it the way you have done it here: even though it means repeating the same thing over-and-over, it's a must.
I also suggest you use a Variable for the SearchBar object, as what you've done is not good practice, and gets repetitive. Fast.
Whats more, you didn't create/ define a Function named onChanged prior to the connection part of the script; you just pulled it out of nowhere(!?!)
Last but not least, you rewrote the same code TWICE; you only need one in this case!
This is how your code should look; however, I'm NOT rewriting & redoing the whole script for you: that's your job.
1 | local SearchBarObject = script.Parent:WaitForChild( 'SearchBar' ) |
3 | local StringComparisonExample = 'I\'m a string :P' |
5 | if StringComparisonExample ~ = 'I\'m a wizard! :D' or StringComparisonExample ~ = 'I\'m Merasmus!' then |
6 | print ( 'I\'m not a wizard ;c' ) |
Again, I'm not rewriting your entire code: that's your job; the examples I gave are for reference ONLY.
Please take these notes/ pointers into consideration; it'll help you in the future. :)
Btw, I didn't mean to sound mean, rude or harsh: it's just how you did your code and set it up, as well as your question; please read the article that which I pointed out in the beginning for future reference. :)