When specifying rigidbody

I implemented a dash mechanic and I am trying to carry the velocity the player had before dashing to after he is done dashing. I made Vector2 originalVelocity and set it equal to myrigidbody.velocity and it is working, only problem is I don’t want it to carry over the y velocity and only the x. However, when I set originalVelocity equal to myrigidbody.velocity.x, I get the error “Cannot implicitly convert type ‘float’ to 'UnityEngine.Vector2.” I only get this error when specifying x. Here is my code:

IEnumerator Dash(float dashDuration, float dashCooldown)
    {
        Vector2 originalVelocity = myrigidbody.velocity.x;
        isDashing = true;
        canDash = false;
        myrigidbody.gravityScale = 0;
        myrigidbody.velocity = Vector2.zero;
        yield return new WaitForSeconds(dashDuration);
        isDashing = false;
        myrigidbody.gravityScale = normalGravity;
        myrigidbody.velocity = originalVelocity;
        yield return new WaitForSeconds(dashCooldown);
        canDash = true;
    }

Can somebody explain how I can achieve this?

Create new Vector2 with correct x and y values and set is to velocity. Below code will carry over the x but keeps the y same as it is:

   myrigidbody.velocity = new Vector2(originalVelocity.x, myrigidbody.velocity.y);