Why won't my script see the main camera?

This script is in a prefab. When I run the script, Unity says... "NullReferenceException: Object reference not set to an instance of an object"

function StartAtARandomSpot( zdepth : float )
{
    var campos : Vector3 = Vector3(Random.Range(0,scrWidth), scrHeight+80, zdepth);
    campos = Camera.main.ScreenToWorldPoint (campos);
    transform.position = campos;
    originalSpawnPoint = transform.position;    
}   

Any help would be greatly appreciated.

Make sure that your camera is tagged as MainCamera, or "Camera.main" won't work. Otherwise, I've verified that your script is fine. Although, you could simplify it to:

function StartAtARandomSpot( zdepth : float )
{
    var campos : Vector3 = Vector3(Random.Range(0,scrWidth), scrHeight+80, zdepth);
    originalSpawnPoint = transform.position = Camera.main.ScreenToWorldPoint (campos);
}

(Note that you don't even need the campos variable, but for readability you could easily justify keeping it)