change font size help - impossible?

i need to change the font size for my script. i have tried doing this (shown in my script) but it has no affect on it. how can i increase the text size without using dynamic fonts

var hasCollided : boolean = false;
var labelText : String = "";
 
function OnGUI()
    {
        if (hasCollided ==true)
    {   
        GUI.Label(Rect(140,Screen.height-50,Screen.width-300,120),(labelText));
        GUI.Label.fontSize = 50;
    }
}
 
function OnTriggerEnter(c:Collider)
    {
        if(c.gameObject.tag =="Player") 
 
    {
 
        hasCollided = true;
        boxText = "DOOR LOCKED";
        
}
}
 
function OnTriggerExit( other : Collider ){
    hasCollided = false;
 
}

thanks

first, try putting it before the label(not sure if that will fix it)

if not you will have to use a guiskin(documentation, manual)

first create a public GUISkin guiSkin;

guiSkin.label.fontSize = 50;
GUI.skin = guiSkin;

(untested)

by the way, for bools you don’t have to write if (hascollided == true), if (hascollided) is enough, and if (!hascollided) is the opposite