material failing to render

i made this script it works fine but one problem it render no material how can i make it so that it will render a font on a 3d text and a material on a block ( 3D end level menu)

var nxtlvl : boolean = false;



function React ()

{

	nxtlvl = true;

}

function Update ()

{

	if(nxtlvl)

	{

	gameObject.AddComponent(MeshRenderer);



	}

}

Its kind of the same issue I am having, there is no renderer on a guitext…