[Closed] "The regerenced script on the Behavior is missing!"

I have no idea what it’s talking about, I don’t see anything wrong with my code.

using UnityEngine;
using System.Collections;

public class ENAI : MonoBehaviour {

	// Use this for initialization
	void Start () {
		InvokeRepeating("SpawnEnemy",1,1);
	}
	
	// Update is called once per frame
	void SpawnEnemy () {
		int rndizer = Random.Range(1, 51);
		if (rndizer == 1 ) {
			Rigidbody clone;
			clone = Instantiate (GameObject.Find ("Enemy"), transform.position, transform.rotation) as Rigidbody;
			clone.AddForce (Vector3.forward / 40);
		}
	}
}

When you call GameObject.Find, this will return a GameObject.

When you call Instantiate on this GameObject, this will also return a GameObject, so your cast with ‘as’ will not return a valid rigid body.

You should store the GameObject returned and use GetComponent to access the RigidBody.