Why Does this Work on a Hierarchy Object but NOT a Prefab?

Why does this script only work on objects/child objects I drag and drop from the hierarchy and not on ones I drag from my prefabs?

#pragma strict

var torch : GameObject;

function Start ()
{
	torch.SetActive(false);
}

function OnTriggerEnter()
{
	torch.SetActive(true);
}

function OnTriggerExit()
{
	torch.SetActive(false);
}

(the script is used to make it so the lights in a room/area only come on when the player is in that area)

Thanks

Through code you only can put a prefab in scene through Instantiate() method. See script reference for details.