Serial - Wait for Input

I'm using the Arduino Leonardo, and I'm using the Serial Monitor. I want the serial Monitor to wait for input before moving on. Anyone know a way to do this?

int threshold;

void setup()
{
  Serial.begin(9600);
  Serial.println("What would you like the Maximum Threshold to Be?");
  threshold = Serial.read(); //RIGHT here I want it to wait for the user to input something, then continue.
  Serial.print("Your threshold is ");
  Serial.println(threshold);
  
}

void loop()
{
 
  int sensorInput = analogRead(0);
  if (sensorInput > threshhold)
  {
  Serial.println(sensorInput);
  }
  
  delay(100);
}

Thanks for the help!

while(Serial.available() == 0);

If you could possibly include that in the code example I gave that'd be great!

bosox99:
If you could possibly include that in the code example I gave that'd be great!

Code was already given, so I'm not sure what you are asking.

Keep in mind that the serial monitor gives you the option to include CR, LR, or both when you press SEND. So which is your Serial Monitor set to?

I want the serial Monitor to wait for input before moving on.

The Serial Monitor does wait, patiently, for input. The Arduino that it is communicating with might not.

You haven't defined how much input the Arduino should get, or how it knows it got enough, so we can't help you yet.