how to convert a Vector3 to a float value?

Basically I’m trying to manipulate the Transform.rotation.z component using Input.mousePosition to accomplish rotation of the sprite to face the direction of the mouse curser. I’ve tried using (more like misusing) Quaternion commands, but they confuse me so I’ve probably just been skipping right over the answer by mistake lol. Any advice is greatly appreciated. Thank you.

use Camera.ScreenToWorldPoint(Input.mpuseposition) to convert screen point to world point and then subtract this from transform.position of the sprite. So you have a Vector3 “vv” and can change the transform.up or transform.right of the sprite
transform.up=vv.normalized; You can use transform.LookAt as well.