Cannot attach game object to script.

I made a script for opening a gate but when i try to game attach game object to it , it was not going not even by using small dot besides it .
It only shows some fbx objects.
Please help

Here is the script

using UnityEngine.UI;

public class DoorCellOpen : MonoBehaviour {

public float TheDistance;
public GameObject ActionDisplay;
public GameObject ActionText;
public GameObject TheDoor;
public AudioSource CreakSound;

void Update () {
	TheDistance = PlayerCasting.DistanceFromTarget;
}

void OnMouseOver () {
	if (TheDistance <= 2) {
		ActionDisplay.SetActive (true);
		ActionText.SetActive (true);
	}
	if (Input.GetButtonDown("Action")) {
		if (TheDistance <= 2) {
			this.GetComponent<BoxCollider>().enabled = false;
			ActionDisplay.SetActive(false);
			ActionText.SetActive(false);
			TheDoor.GetComponent<Animation> ().Play ("FirstDoorOpenAnim");
			CreakSound.Play ();
		}
	}
}

void OnMouseExit() {
	ActionDisplay.SetActive (false);
	ActionText.SetActive (false);
}

}

There was no compile errors .

Hi,

Is this the entire script or just a snippet? There is no visible reference to PlayerCasting. I have no idea what that is.

Also, are you trying to attach this code to a game object or trying to assign a game object to one of the 3 game object variables?