does a while loop also freeze other scripts?

In my inputscript when the character press a skill I want to show the range and let the player choose where to place it and confirm with the mouse button.

My question is how should I detect that I am in the state after I have selected the skill and actually fire it?

I have added some pseudo-code of my attempt but I’m unsure how it will work, if the user press an ability and do nothing will all other scripts stop working and wait for this one to finish or anything like that? Its fine if only this script is affected for my game but it feels like there should be a better way to do this.

Update(){
  if(input is a ability key){

      while(true){
         //display range and stuff
         if(input is left mouse button){
            //do some skill stuff
            break;
         }
         if (input is right mouse button or ESC){
            //do nothing
            break;
         }
      }
   }
}

Your while loop will run constantly until the input buttons are pressed. This will stop all other scripts from running. Update() is called every frame, so I don’t understand why you need to have a while loop.

I´m a noob to unity but
its like gjf said - you don´t need that while loop

Update() { // called every frame like a while-loop
   if(input is a ability key)
   { 
      //display range and stuff -> show a GameObject or UI (set it to visible or instantiate it)
   }
   else if(range and stuff displayed)
   {
      // hide / destroy range and stuff
   }
 }

and in a other script i`ll handle the other input - i don´t know what you want to do