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:
local TextBox = script.Parent.Parent.Parent.TextBox script.Parent.MouseButton1Click:Connect(function() if TextBox.Text == "12345" then print("Code accepted") end end)
Thanks for your help.
local TextBox = script.Parent.Parent.TextBox script.Parent.FocusLost:Connect(function() if TextBox.Text == "12345" then print("Code accepted") end 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.