PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

TextBox.FocusLost1

TextBox.FocusLost1

Oct 01 2018, 2:20 AM PST

The example shown below will print “Focus was lost because enter was pressed!” whenever the TextBox loses focus as a result of the enter key being pressed.

script.Parent.FocusLost:Connect(function(enterPressed)
    if enterPressed then
        print("Focus was lost because enter was pressed!")
    end
end)