How do I stop gui from opening when the player is typing in the chat

How would I stop the gui from opening if a player is typing in the chat? Is there any links to posts with the same problem I have? If you find some send me the link.

This is an example script:

UIS.InputBegan:connect(function(input)
				if input.KeyCode == Enum.KeyCode.Space then
					Frame.Visible = true
					wait(2)
					Frame.Visible = false
				end
			end)

All you have to do is add the gameProcessedEvent that is given through the function. This is a bool that will tell you whether or not a button is binded to the context action service, in your case you don’t want it to be so we check if its false.

UIS.InputBegan:connect(function(input, istyping) 
	if input.KeyCode == Enum.KeyCode.Space and not istyping then
		Frame.Visible = true
		wait(2)
		Frame.Visible = false
	end
end)
4 Likes