Can't Make Player Jump

I’m very new to coding, so i apologize if this is a question with an obvious answer, but whenever i have this block of code running, my character will constantly move up from the moment I start the game, but if i disable the code or cut out this section, the character falls (which is what I want to happen at any time that the “w” button isn’t being pressed.)

void Update()
    {
        if (Input.GetKey("w")) ;
        {
            rb.velocity = new Vector3(0, 10, 0);
        }
    }

You have a semicolon at the end of line 3. Line 5 will run every frame because it’s not actually part of the if statement. Remove the semicolon.

thank you so much. I didn’t know you don’t use semicolon’s for if statements.