I need help connecting my HC-SR04 Sensor

#include <Wire.h>
#include <ZumoShield.h>

#define LED 13
#define QTR_THRESHOLD 1500

#define REVERSE_SPEED 225
#define TURN_SPEED 200
#define FORWARD_SPEED 250
#define REVERSE_DURATION 250
#define TURN_DURATION 250

ZumoMotors motors;
Pushbutton button(ZUMO_BUTTON);

#define NUM_SENSORS 6
unsigned int sensor_values[NUM_SENSORS];

ZumoReflectanceSensorArray sensors(QTR_NO_EMITTER_PIN);

void waitForButtonAndCountDown()
{
  digitalWrite(LED, HIGH);
  button.waitForButton();
  digitalWrite(LED, LOW);
  delay(3000);
  
}

void setup()
{

  pinMode(LED, HIGH);

  waitForButtonAndCountDown();
}

void loop()
{
  if (button.isPressed())
  {
    motors.setSpeeds(0, 0);
    button.waitForRelease();
    waitForButtonAndCountDown();
  }


  sensors.read(sensor_values);

  if (sensor_values[0] < QTR_THRESHOLD)
  {
    motors.setSpeeds(-REVERSE_SPEED, -REVERSE_SPEED);
    delay(REVERSE_DURATION);
    motors.setSpeeds(TURN_SPEED, -TURN_SPEED);
    delay(TURN_DURATION);
    motors.setSpeeds(FORWARD_SPEED, FORWARD_SPEED);
  }
  else if (sensor_values[5] < QTR_THRESHOLD)
  {
    motors.setSpeeds(-REVERSE_SPEED, -REVERSE_SPEED);
    delay(REVERSE_DURATION);
    motors.setSpeeds(-TURN_SPEED, TURN_SPEED);
    delay(TURN_DURATION);
    motors.setSpeeds(FORWARD_SPEED, FORWARD_SPEED);
  }
  else
  {
    motors.setSpeeds(FORWARD_SPEED, FORWARD_SPEED);
  }
}

i cant seem to connect my sensor, im using a Zumo Shield and trigger pin is pin 9 and echo is pin 10. Im using the Sensor to detect and attack opponents.

The sensor is working perfect when tested alone.

Sorry, that doesn't make sense. Explain as clearly as possible what you tried to do, and what happened when you tried. Post the code you actually used in the trial. The code you did post has nothing to do with the HC-SR04.

For shields, ALWAYS check the manual, data sheet or getting started guide to learn which pins are free to use, and which are not. Post a link the Zumo shield product page.

I did your homework for you, at least for V1.2 of the Zumo Shield.

Do you see the problem in the table below?