Lerpz Tutorial Again

I need help figuring out what I did wrong. I’m working on the Lerpz final cut scene and I get this error. Unknown Identifier ‘playerLink’. Here is where I set the playerLink to find Object “Player” in the level status script.

function Awake()
{
	levelGoal.GetComponent(MeshCollider).isTrigger = false;
	playerLink = GameObject.Find("Player");
	
	if(!playerLink)
	{
		Debug.Log("Could not get link to Lerpz");
		levelGoal.GetComponent(MeshCollider).isTrigger = false; //make very sure of this
	}
}

Here is where it crashes and gives me that error.

playerLink.GetComponent(ThirdPersonController).SendMessage("HidePlayer");
	playerLink.transform.position+=Vector3.up*500; //just move the player up 500 units

I believe that I fixed the problem by adding the following line at the top of my script.

private var playerLink : GameObject;

I have was having the same problem! It took me hours to figure out the solution and yours worked!

When ever you have a var… Short for variable, it is something you must declare. It can be a class, avaialable thru out the script and accessable by other scripts. Or it can be local, isolated to a function. Anyhow, perhaps you did not declare the playerLink var.