Starting a series of for loops with a button press

So I have 3 LEDs, and a buzzer. I want to brighten and dim the 3 LEDs sequentially, and then have the buzzer make a tone, all after a button is pressed. I was able to make one LED brighten and dim with just a for loop. I tried to test if I could make it happen with a button press, but now it won’t work.

I used a voltmeter and checked all connections, and ran some other diagnostic tests to make sure the button and LED worked properly, and they seem to be in order, so there must be something wrong with my code. Here it is:

int rightButton = 0;
const int rightButtonPin = 9;

const byte redLED = 3;  //red LED pin
const byte greenLED = 6;  //green LED pin
const byte yellowLED = 5; //yellow LED pin
const int buzzerPin = 4; //buzzer pin

int a = 255;

void setup() {

  pinMode(redLED, OUTPUT); //red led
  pinMode(buzzerPin, OUTPUT); //buzzer
  pinMode(yellowLED, OUTPUT); //yellow led
  pinMode(greenLED, OUTPUT); //green led
  pinMode(rightButtonPin, INPUT);  //right button

  //pins low
  digitalWrite(greenLED, LOW);
  digitalWrite(yellowLED, LOW);
  digitalWrite(redLED, LOW);
  digitalWrite(buzzerPin, LOW);

}//setup

void loop() {

  if (rightButton == HIGH){
    for(a = 225; a >= 0; a = a - 10){
    analogWrite(redLED, a);
    delay(50);
    }
    for(a = 0; a <= 225; a = a + 10){
    analogWrite(redLED, a);
    delay(50);
    }
  }
  
  
}//loop

First thing, do you have a 10k pulldown resistor connected between pin 9 and GND?

yup

What do you mean, "won't work"? Be more specific.

aarg: What do you mean, "won't work"? Be more specific.

when I push the button nothing happens

What is the other end of the switch connected to?

aarg:
What is the other end of the switch connected to?

the switch on one side is connected to pin 9 which is also connected to ground by a 10k resistor.

The other side goes straight to 5v

well, I am an idiot. Just had to add this line at the start of the loop:

rightButton = digitalRead(rightButtonPin);

-_-