Hello, I need help with this script, Why is it not working? I would like to have a text output if the text in the text box is "12345".
Here is my script:
1 | local TextBox = script.Parent.Parent.Parent.TextBox |
2 |
3 | script.Parent.MouseButton 1 Click:Connect( function () |
4 | if TextBox.Text = = "12345" then |
5 | print ( "Code accepted" ) |
6 | end |
7 | end ) |
Thanks for your help.
1 | local TextBox = script.Parent.Parent.TextBox |
2 | script.Parent.FocusLost:Connect( function () |
3 | if TextBox.Text = = "12345" then |
4 | print ( "Code accepted" ) |
5 | end |
6 | end ) |
FocusLost fires whenever a player presses enter, clicks out of the text box, or anything that would stop the player from typing into the text box.