How to detect when a TextBox in a GUI has a specific string of characters?
✓ ANSWER ACCEPTED
Can you use UserInputService for TextBox? [SOLVED]
1 answer
✓ Accepted answer
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.
1 comment
0
*print("detected")
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
Yes you can, if someone hasn't already answered by the time I'm home i'll guide you towards the right path.
Community, do not mark this post as Not Constructive. The claim is weak, and the asker is requesting a yes or no question pertaining to a function of scripting. This question is constructive.
Thanks guys :D
I don't think it's constructive because he doesn't elaborate on his question. It tells you to do so when posting a question.
Yes it is because I wasn't actually asking for a answer I was just wondering if it was possible