I am making a script inside TextButton script that will check if the TextBox contains any of the word or string inside the table.
text = script.Parent.Parent:WaitForChild('TextBox') label = script.Parent.Parent:WaitForChild('TextLabel') a = {'ziploz','flyemirates27','groovydominoes52'} script.Parent.MouseButton1Click:connect(function() if string.match(text.Text, a) then label.Text = "The word "..text.Text.." was found in the table." else label.Text = "The word "..text.Text.." was not found in the table." end end)
What's the right way to do it?