Code:
#include <stdio.h>
#include <cs50.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

int
main(int argc, char *argv[])
{
    // check number of arguments
    if (argc != 2)
    {
        printf("You must enter 1 argument. You also cannot enter more than 1.\n");
        return 1;
    }
    
    // check if alpabetical
    int keyLenght = strlen(argv[1]);
    char *key = argv[1];
    for (int i = 0; i < keyLenght; i++)
    {
        if ( !isalpha( key[i] ) )
        {    
            printf("Argument must be alpabetical only. \n");
            return 1; 
        }
    }
    
    // User enters message
    printf("Enter your secret message: ");
    char *inputTxt = GetString();
    
    // encrypt and print cypher
    printf("Secret message encrypted : ");
    int inputLenght = strlen(inputTxt);
    for (int i = 0; i < inputLenght; i++) 
    {   
        // transform key string into int from 1 to 26
        int finalKey = key[i];
        if ( isupper(finalKey) )
            finalKey = finalKey - 65;
        if ( islower(finalKey) )
            finalKey = finalKey - 97;
        finalKey = finalKey % keyLenght; 
            
        // encrypts capital letters
        if (inputTxt[i] >= 65 && inputTxt[i] <= 90)
        {    
            // transforms char from ascii to 1 to 26 and adds key
            char cypherChar = inputTxt[i] - 65 + finalKey;
            // modulo 1 to 26 number and transforms back to ascii
            cypherChar = (cypherChar % 26) + 65;
            // prints the character
            printf("%c", cypherChar);        
        }
        // encrypts small letters
        else if (inputTxt[i] >= 97 && inputTxt[i] <= 122)
        {    
            // transforms char from ascii to 1 to 26 and adds key
            char cypherChar = inputTxt[i] - 97 + finalKey;
            // modulo 1 to 26 number and transforms back to ascii
            cypherChar = (cypherChar % 26) + 97;
            // prints the character
            printf("%c", cypherChar);        
        }
        else
            // prints the character
            printf("%c", inputTxt[i]);   
    }
    
    // end of program
    printf("\n");
    return 0;
}
There's a problem with the modulo on the finalKey variable. I never took math so I don't understand modulo very well but I think I need it to accomplish the desired result.

What the program is supposed to do:

Take the each letter of the key variable, transform it into its number from 0 to 25, then take the secret message and move each of the letters up in the alphabetical order by the number of one of the characters in key. When the key string runs out of character, it should go back to its first character.

What happens when I run my program:

jharvard@appliance (~/Desktop/cs50 projects): ./vigenere bbaa
Enter your secret message: aaaaaa
Secret message encrypted : bbaaad

Conclusion

I *think* everything is working except for this part:

Code:
        // transform key string into int from 1 to 26
        int finalKey = key[i];
        if ( isupper(finalKey) )
            finalKey = finalKey - 65;
        if ( islower(finalKey) )
            finalKey = finalKey - 97;
        finalKey = finalKey % keyLenght;
If anyone can tell me what the problem is and maybe a simple way to understand modulo that would be awesome.