How would you check the local velocity of a rigidbody on a single axis

I’m implementing a move which freezes the player’s rotation, since it uses the player’s rotation for the move ,I need to know when the player’s velocity going side-ways reaches zero to unfreeze the rotation. My character’s rotation is based off of velocity, so I need their side-ways velocity to be zero before I unfreeze the rotation so they are still facing forward.

Use those to check the speed, THEY NEVER GO BELOW 0

  rigidbody.velocity.x
    rigidbody.velocity.y
    rigidbody.velocity.z 
    rigidbody.velocity.magnitude //All the axis togheter

if I’m understanding your question correctly, this should do it:
Mathf.Abs(rb.velocity.x)