WorldToScreenPoint not working with Instantiated Object.

I want to have an object instantiate at a certain position and then have a floating text and a button overlaid at the objects position. I cannot have these objects as world UI as they warp with the camera perspective when I animate them and want the text the same size even if some objects are further away.

So the code I have works if I have an object already in my scene and click start. If I try to instantiate the object, the code does not work. Any ideas?

Script #1

var object = Instantiate(Resources.Load("Object", GameObject), new Vector3(5, 0.5, 0), Quaternion.identity);	

Script #2 (placed on the prefab object)

var gOTransform		: Transform;
var button			: GameObject;
var text			: GameObject;
var cameraMain 		: Camera;

function Start()
{
	var cameraPos : Camera = cameraMain.GetComponent(Camera);
	var screenPos : Vector3 = cameraPos.WorldToScreenPoint(gOTransform.position);		
	button.transform.position = screenPos;	
	text.transform.position = screenPos;
}

If the Button and Text are using RectTransforms, then you need to use the RectTransform’s anchoredPosition property, not Transform’s position property. But, that’s assuming you’re using a canvas with UGUI. Since they are GameObject references, I can’t tell.