'parent' is not a member of 'Object'.

I’m get these errors:
‘parent’ is not a member of ‘Object’.
‘localPosition’ is not a member of ‘Object’.

I guess it’s something to do with Unity not knowing what the variable object is. When I put : gameObject; after I declared the variable object the errors went away but it didn’t know what gameObject was. What do I do to get these error away and why are they here?

var PickedUp;

var object;

function Start ()
{
	object = gameObject.transform;
}

function PickUpObject ()
{	
 	PickedUp = true;
 	
	object.parent = Camera.main.transform; 

	object.localPosition = Vector3.forward * 5;
	
	rigidbody.useGravity = false;
	
	rigidbody.isKinematic = true;
}

You will find things are much easier when you declare you variables with an explicit type

var object: Transform;