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.

4 comments
Are you using a LocalScript?
Make sure you're using a LocalScript in your TextButton
The Only Problem. That Can Be Is That Your Not Using A LocalScript
MouseButton1Click is not a valid event of TextBox. It's reserved for buttons only i think