How to check if the player is typing in chat

so I have a shop that you need to press E to open, but if you’re chatting and type it, it still opens.

I know there is a way to fix this, just another if then statement. but how would I write it? thanks a lot.


UserInputService | Roblox Creator Documentation has a bool for whether or not the game already processed the key pressed. Check that it’s false before doing additional things.