Stop player movement when typing

When a user clicks on a text box, the player still moves when typing. I’m looking for a way to stop player movement when typing. Thank you.