Hey, i need help with GUI text ibn javascript

hey, Im making a code for a multiple choise question but for some reason when i drag the mouse over it , it does change coler but when i click, it does not, what could be going on?

#pragma strict
var correct = true;
var answer = true;
var wrong = false;
var locking = false;

function Start () {
Screen.lockCursor = true;
}

function Update () {
Screen.showCursor = false;
// center mouse   
    if (Input.GetKeyDown(KeyCode.P))
    	if (Screen.lockCursor)
    	Screen.lockCursor = false;
    	
    else{
    Screen.lockCursor = true;
	}
//if correct
	if (Input.GetButtonDown("fire1")&& answer)
	{
	renderer.material.color = Color.green;
	locking = true;
	}
	if (Input.GetButtonDown("fire1")&& wrong)
	{
	renderer.material.color = Color.red;
	locking = true;
	}
	if (wrong && answer)
	{
	answer = false;
	}
						
}
// change color when mouse is on
function OnMouseEnter ()
	{
	if (locking = false)
		renderer.material.color = Color.red;
	}
	
function OnMouseExit ()
	{
	if loking = false;	
		renderer.material.color = Color.white;
	}
thanks a lot

For a click you can use the MonoBehaviour function OnMouseUpAsButton , which on click will change the color when the user releases the button.

function OnMouseUpAsButton()
{
    if(correct)renderer.material.color = Color.green;
    else renderer.material.color = Color.red;
}