How would the event fire when pressing Enter?

Hello. I am trying to make a command bar. I have made this script, but the problem is that I want to execute it when I press enter. But the event fires when i finish to type the word “baseplate”. Any help?
(Local) Script:

local TextBox = script.Parent

	local Input = TextBox.Text
	if Input == "baseplate" then

I believe the solution is to use a different event from this dev hub tutorial / recipe/code piece using focus lost, which has enter pressed detection in the event:

1 Like