Local Velocity

Does anyone know a way to edIt the velocity of a rigidbody relative to the transform’s rotation? Like a local velocity?

Just curious, would this work as expected?
transform.rigidbody.velocity = Vector3(transform.position.forward);

The rigidbody velocity is relative to the world, but if you transform the new velocity from local to the world space it will work. Your suggestion is almost ok - you should write:

// speed is the magnitude (float)
rigidbody.velocity = transform.forward * speed;