this is my script
1 var target : Transform;
2
3 function Update () {
4 }
5
6 function OnMouseDown () {
7 this.transfrom.position = target.position;
8 this transform.parent = GameObject.Find(“FPSController”).transform;
9 this.transform.parent = GameObject.Find(“FirstPersonCharacter”).transform;
10 }
11
12 function OnMouseUp () {
13 this.transform.parent = GameObject.find(“FPSController”).transform;
14 this.transform.parent = null;
15 }