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);
}
}
}