- Home /
how can i correct this error PickUp.js(8,9): UCE0001: ';' expected . insert a semicolonat the end,..(unity5.4.1f1) is my version
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 }
8 this transform.parent = GameObject.Find("FPSController").transform;
You were supposed to put a dot ( . ) after this keyword. Rest is as tanoshimi said.
Answer by tanoshimi · Nov 22, 2016 at 11:27 AM
This is a horrible mess. Please format it properly so we can see the real errors (i.e. the misspelling of "transfrom" and using "find" instead of "Find") from the errors which, presumeably, you only introduced when pasting your code (i.e. function Update () { 4 }).
Your answer
Follow this Question
Related Questions
pickups used to open doors 3 Answers
SetActive Not Responding 3 Answers
Items Changing Player Stats, Backpack increasing Inventory Size 1 Answer
looking for help with item pickups 1 Answer