Parsing Error

Hello I have this script

var target : Transform; 

function Update() {
		transform.position = camera.WorldToViewportPoint(target.position);
		guiText.text = Vector3.Distance(target.position, transform.position);

and it says there is a parsing error on line 1. I am new to Unity and scripting so if anyone could help me fix this error that would be greatly appreciated.

I see no error on line 1. You will have to do something to convert the distance to a string:

 guiText.text = Vector3.Distance(target.position, transform.position).ToString();


guiTExt.text = "" + Vector3.Distance(target.position, transform.position);

While not directly related to your question, I recommend leaving the #pragma strict at the top of the file. With #pragma strict some errors that would only be found at runtime are found at compile time.

P.S. You would get an error on line 1 if you put this script in a C# file. This is Javascript/Unityscript.