Image wont appear after pressing "E" no errors

Title says all. Here is my script

var hasCollided : boolean = false;
var labelText : String = "";
 var aTexture : Texture;
function OnGUI()
{
    if (hasCollided ==true)
    {   
        GUI.Box(Rect(140,Screen.height-50,Screen.width-300,120),(labelText));
    }
}
        

function OnTriggerEnter(c:Collider)
    {
        
        if(c.gameObject.tag =="Player") 
 
        {
 
            hasCollided = true;
            labelText = "Hit E to Read";
         	

		}
		
    }
    
    	if (Input.GetKeyDown ("e")){
    if(!aTexture);{
				
		GUI.DrawTexture(Rect(10,10,60,60), aTexture, ScaleMode.ScaleToFit, true, 10.0f);
		
		}
	}
    function OnTriggerExit( other : Collider )
	    {
        hasCollided = false;
 
    }

placing semicolon after if is not a good idea :slight_smile: remove it and should be fine

if(!aTexture);

Not all that knowledgeable with JS but it looks like this:

if (Input.GetKeyDown ("e")){
if(!aTexture);{
 
    GUI.DrawTexture(Rect(10,10,60,60), aTexture, ScaleMode.ScaleToFit, true, 10.0f);
 
    }
}

isn’t even in a function. Try doing this:

function OnGUI() // ***** Edited with proper code *****
{
    if (Input.GetKey("e"))
    {
        if(aTexture)
        {
        GUI.DrawTexture(Rect(10,10,60,60), aTexture, 
                             ScaleMode.ScaleToFit, true, 10.0f);
        }
    }
}

And you should be fine.
P.S. The semicolon was also an issue I think, so I removed it.