yeah so i have this thing its like a password to enter the game so only certain ppl can enter if they know the code bc they in my discord server and it kicks me while i am typing in the code to enter bc idk how to detect if the player is currently typing into a textbox. thx.
✓ ANSWER ACCEPTED
how to tell if textbox is currently being typed into?
1 answer
✓ Accepted answer
I see no need for you to detect this. I'm assuming you're already checking the .Text property before evening assuring that the user actually typed in anything viable.
Instead, I recommend you confirm the password upon the user pressing return, using the .FocusLost signal of TextBox and it's EnterPressed boolean parameter:
local TextBox = script.Parent
TextBox.FocusLost:Connect(EnterPressed)
if (not EnterPressed) then return end
---------------
print(TextBox.Text == "Code")
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
k thx