Uctronics Robot Car Kit- No Va

I am doing a project where I need to make the car go and then stop at a wall using ultrasonic sensors(Hc-SR04). I have uploaded the code but it just hums. Any advice, tips or fixes would be great thanks. Here is the code I found and have been modifying.
/*

Ultrasonic sensor Pins:
VCC: +5VDC
Trig : Trigger (INPUT) - Pin11
Echo: Echo (OUTPUT) - Pin 12
GND: GND
*/

#include <Servo.h>
#include<NewPing.h>
Servo myservo;

int Trig = 8; //Trig - green Jumper
int Echo = 9; //Echo - yellow Jumper
long duration, dur_cm, dur_inches;

#define ENA 5
#define ENB 6
#define IN1 2
#define IN2 3
#define IN3 4
#define IN4 7
#define carSpeed 250

void stop() {
digitalWrite(ENA, LOW);
digitalWrite(ENB, LOW);
Serial.println("Stop!");
}

void forward(){
analogWrite(ENA, carSpeed);
analogWrite(ENB, carSpeed);
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
Serial.println("Forward");
}

void setup() {
//Serial Port begin
Serial.begin (9600);
//Define inputs and outputs
pinMode(Echo, INPUT);
pinMode(Trig, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
stop();
}

void loop()
{
myservo.attach(3);
myservo.write(90);

// The sensor is triggered by a HIGH pulse of 10 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
digitalWrite(Trig, LOW);
delayMicroseconds(5);
digitalWrite(Trig, HIGH);
delayMicroseconds(10);
digitalWrite(Trig, LOW);

// Read the signal from the sensor: a HIGH pulse whose
// duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(Echo, INPUT);
duration = pulseIn(Echo, HIGH);

// convert the time into a distance
dur_cm = (duration/2) / 29.1;
dur_inches = (duration/2) / 74;

Serial.print(dur_inches);
Serial.print("in, ");
Serial.print(dur_cm);
Serial.print("cm");
Serial.println();

delay(250);

if (dur_cm <= 50){
stop();
} else {forward();
}

}

but it just hums

Maybe it has forgotten the lyrics.

Please remember to use code tags when posting code.

Sorry first time using a forum and arduino.

Why is the servo attach in the loop?

What do the debug prints tell you is going on?

It was how a friend showed me. I have little to no experience coding. Neither does anyone else involved with the project.

What is the power supply?
How is the motor connected?
How is the servo connected and powered?

Where is your schematic?

When I verify and compile the program says there is no errors but when I upload it the car doesn’t move. Is it because I assigned the wrong pins or the program doesn’t accomplish my goal. I am sorry for my lack of knowledge and thank you for your help.

I asked four questions, and got zero answers.

That's not a good ratio.

Everything is hooked to a motor control shield. My power supply is 2 18-650 batteries. I don’t have the servo hooked up because I don’t need it. So i need to remove it from the code. I am sorry for not replying quickly enough I barely know what I am doing. Trying to attach a picture but the size is to big, working on it

On the motor control shield
Front two motor are connected to M3 +/- and M4 +/-
Rear two motors are connected two +/- of M1 and M2
Not requiring the servo
Ultra sonic sensor is attached too VCC, TRIG, EHCO, GND
The motor shield is a L293D motor drive expansion board.
Link to guide with schematics
https://www.robotshop.com/media/files/pdf/uctronics-wifi-smart-robot-car-kit-arduino-datasheet1.pdf