[SOLVED] Trouble using Ultrasonic Sensor

Hello everyone. I was trying to create a project so that when my pet enters the kitchen(ult6), the piezo buzzer buzzes. However, when a person enters(ult7) the buzzer doesn't buzz.
#include <Ultrasonic.h>

Ultrasonic ult7(7);
Ultrasonic ult6(5);
int ButtonHighOrLow;
void setup() {
  pinMode(4, INPUT);
  pinMode(3, OUTPUT);
}

void loop() {
  long RangeInCentimeters7;
  long RangeInCentimeters6;
  RangeInCentimeters7 = ult7.MeasureInCentimeters();
  RangeInCentimeters6 = ult6.MeasureInCentimeters();

  if (RangeInCentimeters6 < 150 && RangeInCentimeters7 >= 150) {
    for (int i = 0; i < 10000; i++) {
      ButtonHighOrLow = digitalRead(4);
      if (ButtonHighOrLow == HIGH) {
        noTone(3);
        break;
      }
      else {
        tone(3, 1250);
        delay(1);
      }
    }
    noTone(3);
  }
  else if (RangeInCentimeters7 < 150) {
    noTone(3);
    delay(10);
  }
  else if (RangeInCentimeters7 >= 150 && RangeInCentimeters6 >= 150) {
    noTone(3);
    delay(10);
  }
  delay(10);
}
Yet, whenever I try it the project is completely random. I tried researching it, and I found out that the range of the Ultrasonic sensor is not straight, but rather conical. Any ideas for it to work?
[iurl=https://www.tinkercad.com/things/iEpMAOzxZKR-ultrasonic/editel?sharecode=85NTGKPyu1TeNnTtjpoV6eBEfRwUGN79LYoFX5rwC84]Tinkercad link[/iurl]

MarvelShooCopy.ino (867 Bytes)

A typical ultrasound sensor has a cone of about 30°.

I guess you want to use one ultrasound sensor to measure high, the other low, to distinguish between small pet and big human?

Another thing, if that human is wearing a nice fluffy jumper with smooth pants (or no pants) the upper one won't register anything but the lower one will... clothing, particularly the fluffy kind, absorbs ultrasound waves well. So, by the way, does the fur of a furry pet.

Break beam sensors may be more reliable here.