unable to attach a script to a prefab

I have a prefab that I am using with a script attached to it. Here is the code:

using UnityEngine;
using System.Collections;

public class bagDetect : MonoBehaviour {
	public GameObject okToShoot;
	public bool canScore = true;
	void Start () {
		okToShoot.GetComponent<ID355> ().okToScore = true;
	}
	void Update () {
		canScore = true;
	}
}

the problem is i cannot seem to attach the reference to it. It will not let me drag and drop or assign the variable. This is the error i get when i run the game. Any ideas on what i am doing wrong???

UnassignedReferenceException: The variable okToShoot of bagDetect has not been assigned.
You probably need to assign the okToShoot variable of the bagDetect script in the inspector.
UnityEngine.GameObject.GetComponent[ID355] ()
bagDetect.Start () (at Assets/bagDetect.cs:8)

What’s happening is you’re instantiating a prefab.
This new prefab has no idea what okShoot is when its instantiated.

So what you need to do is something like this…

   // Instantiate prefab and get its script
    var instantiatedPrefab = GameObject.Instantiate(Resources.Load("PrefabName"));
    var bagDetectObj = instantiatedPrefab.GetComponent<bagDetect>();
    
    // Now set okShoot on the bagDetectScript on your instantiated prefab
    bagDetectObj.okShoot = GameObject.Find("okShootGameObject");

How would you do this with UI elements? GameObject.Find wont work for me?