How to detect when a TextBox in a GUI has a specific string of characters?
You just need to use an if
statement to compare a preset variable - your string of characters - and the TextBox's Text
property.
local text = 'StringOfCharacters' local textboxtext = Gui.TextBox.Text if text == textboxtext then print'detected' end
Alternatively, you can use the string.gmatch
function, provided with any of various string patterns. More info here.