How can i detect what caused a textbox to lose focus

So i am working on a project. Right now when i press enter the textbox loses focus and when it loses focus my script can’t detect if it had focus or not. So is there a way to detect what caused the textbox to lose focus or stop losing focus when enter is pressed?

you can use the parameters the FocusLost event gives you.

1 Like

Use FocusLost function

TextBox.FocusLost:Connect(function()
	-- Function
end)

Thank you, i created an EnterPressed function then it worked!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.