Controlling motor dc speed with potentiometer

Hello everyone.I want to make a circuit where I can control a dc motor’s speed with a potentiometer. I also want that when the motor is off, a led turns on; when the motor is working at a normal speed, another led turn on; and when the motor is working at its maximum speed, another led turns on. The led thing works, but the motor doesn’t move at all. Does anyone know why?

int led1 = 13;
int led2 = 12; 
int led3 = 8;
int transistor = 3;
int Pot = A0;

void setup() {
 
pinMode(13,OUTPUT); 
pinMode(12,OUTPUT);
pinMode(8,OUTPUT);
pinMode(11,OUTPUT);
pinMode(A0,INPUT);

Serial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
Pot = analogRead(A0);
analogWrite (3, map(analogRead(0),0,1023,0,255));
Pot=map(analogRead(0),0,1023,0,255);
if(Pot<5) {
  digitalWrite(13,HIGH);
  digitalWrite(12,LOW);
  digitalWrite(8,LOW);
}
if((Pot>5)&& (Pot<120)) {
  digitalWrite(13,LOW);
  digitalWrite(12,HIGH);
  digitalWrite(8,LOW);
  }
if((Pot>120)&& (Pot<=255)) {
  digitalWrite(13,LOW);
  digitalWrite(12,LOW);
  digitalWrite(8,HIGH);
}

Serial.println(Pot);
delay(10);
}

You just asked the same thing in the same forum, an hour ago....

(edit: ok, you added some code, but you could have done that in a reply to your other post)