Somehow the "if" isn't responding to the condition

I'm trying to get my program to call a subroutine when the letter "i" is sent from the serial monitor. Here's the relevant code. I know the value of key is "i" because it prints it to the serial monitor the line before, but it still does not seem to trigger the if condition.

void setup() {
  pinMode(10,OUTPUT);  // Main Menu LED
  pinMode(11, OUTPUT); // Initiative LED
  delay(2000);
  FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS);
  Serial.begin(9600);
}

void loop() {
  char key="X";
  digitalWrite(10, HIGH);  
  if (Serial.available()){
    key=Serial.read();
    Serial.println(key);
    if(key=="i"){
      Initiative();
    }
  }
}

void Initiative() {
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
  delay(5000);
  char key="X";
  int order = 0;
  int battle[15]; //Initalize for 15 possible turns in a round of combat
  
  //Set Initiative Order ending when the key "0" is pressed

I separately sent each of the following values through the serial monitor, but even when I got to "i" it didn't send it to the subroutine.

5
5
6
4
1
i

I'm quite content to have it be some dumb thing like missing a ; somewhere, but what wouldn't even compile.

(The long end goal is to highlight players turns in initiative with an addressable LED strip when we play d&d)

'x' for single character, "z" for a string or null terminated character array. You cannot use == with strings.

Change your character to 'i' and try it.

Your code is incomplete. It will not compile. Please post entire program or MVCE

To compare a string you need strcomp().
Or you need to make it a char first.
key has "X" in it. That is an array of 2 characters (including \0) and does not fit into char.
You could set key to 'X'.

Like I said happy to have it be something simple. You've solved it.

Please mark the thread as "solved"