You'll find it easier to spot errors if you learn to indent blocks of code that are contained within brackets - you're currently missing a closing } at the end of the function, and a closing ) on line 2. Also KeyCode.Escape, not esc. Try this instead:
function OnTriggerEnter(other : Collider) {
if (Input.GetKey(KeyCode.Escape)
{
Application.LoadLevel (3);
}
}
Trending Articles
More Pages to Explore .....