Need help using instantiate on touch position.

I do not know the code to find the touch position because I am knew to coding. I am making it so the text will spawn on top of where the player has tapped the screen.

i guess it would be somewhat like this

    #pragma strict
    public var text: GameObject;
    function Update() {
    	for (var i: var = 0; i < Input.touchCount; ++i) {
    		if (Input.GetTouch(i).phase == TouchPhase.Began) {
    			
    			var theray: Ray = Camera.main.ScreenPointToRay(Input.GetTouch(i).position);
    			
    			if (Physics.Raycast(theray))
    				Instantiate(text, transform.position, transform.rotation);
		}
	}
}