Player can still face every directions in idle state in paused state,How to prevent the player from facing every available directions when in pause state

The player can still face every available directions by pressing WASD keys even if the game is paused. But the player can’t walk, it’s just the player can face left, right, up and down. The game’s top down just like Pokemon games

well there are several ways

for example if you set timescale to 0 when you pause the game

  public void moving(){
  if(Time.timeScale == 1){
  //do move stuff or changing face .....
  }
 }

or you can easily deactive move component when you pause the game like this

 public void pauseGame(){
 MovementScript.enabled = false;

 }

as I said there are several ways and these were just some examples to give you the idea