Im trying to make an RC using an HC-06 Bluetooth receiver

This is my code and i cannot get my car to work, i am pretty new to arduino programming so feel free to call my work bad because it is but if anyone can help me get this to work, thanks!

char t;
int motorSpeedA = 0;
int motorSpeedB = 0;
void setup() {
pinMode(4,OUTPUT);   //left motors forward
pinMode(5,OUTPUT);   //left motors reverse
pinMode(6,OUTPUT);   //right motors forward
pinMode(7,OUTPUT);   //right motors reverse
Serial.begin(9600);
 
}
 
void loop() {
if(Serial.available()){
  t = Serial.read();
  Serial.println(t);
}
 
if(t == 'F'){            //move forward(all motors rotate in forward direction)
  digitalWrite(4,HIGH);
  digitalWrite(6,HIGH);
int motorSpeedA = 255;
int motorSpeedB = 255;
}
 
else if(t == 'B'){      //move reverse (all motors rotate in reverse direction)
  digitalWrite(5,HIGH);
  digitalWrite(7,HIGH);
  int motorSpeedA = 255;
int motorSpeedB = 255;
}
 
else if(t == 'L'){      //turn right (left side motors rotate in forward direction, right side motors doesn't rotate)
  digitalWrite(6,HIGH);
int motorSpeedA = 255;
int motorSpeedB = 255;
}
 
else if(t == 'R'){      //turn left (right side motors rotate in forward direction, left side motors doesn't rotate)
  digitalWrite(4,HIGH);
  int motorSpeedA = 255;
int motorSpeedB = 255;
}

 
else if(t == 'S'){      //STOP (all motors stop)
  digitalWrite(4,HIGH);
  digitalWrite(5,LOW);
  digitalWrite(6,HIGH);
  digitalWrite(7,LOW);
int motorSpeedA = 255;
int motorSpeedB = 255;
}
delay(100);
}

Is your Serial.println() showing the values you expect?

What are motorSpeedA and B for? They are just variables and you change their values but then you never use them for anything.

What motor driver are you using? Is it attached to pins 4-7? The way you're setting those pins looks really strange but maybe it's just an H-bridge driver that I don't know.

Steve

What exactly is the problem? Exactly how do you know it isn't working?

Where are the commands coming from? Are you using a tablet to control it or another Arduino with a different bluetooth module?