get volocity y from rigidbody code example
Example 1: how to get rigidbody speed in unity
var speed = rigidbody.velocity.magnitude;
Example 2: rigidbody velocity c# unity
//for rigidbody2D
GetComponent<Rigidbody2D>().velocity =new Vector2(40,0);