transform.position.y == touch position ??

I want an empty gameobject to have the same y position as where the mouse is on screen (or finger for touch input, wich i need since it’s a mobile game)

Somehow i don’t seem to find anything on answers, so that’s why i ask.
I hope someone knows how to do this, cuz i’m getting sick of days and days of trial and error, when i only get errors:P

The main problem is that i can’t get the touch position to be a vector3 position.

Okay never mind, got it working, with more trying and trying and trying, here’s the code for those who are interested:

var cord : Vector3 ;
function FixedUpdate () 
{
    cord = Camera.main.ScreenToWorldPoint(Input.mousePosition);
    Debug.Log(cord);
    
    
    transform.position = cord;
    transform.position.z = 0;
    transform.position.x = 0;
	
}