This script is having an odd issue, When I try to clone it, It gives me [Running C#]:
! Assetss/Cloning.cs(11,29): error CS1525: Unexpected symbol ‘clone’
Here is my code:
using UnityEngine;
using System.Collections;
public class Cloning : MonoBehaviour {
// Update is called once per frame
void Update () {
var rndizer = Random.Range (1, 11);
if (rndizer == 1) {
Rigidbody clone;
clone = Instantiate(GameObject.find("mainEnemy"), transform.position, transform.rotation) as Rigidbody
clone.velocity = transform.TransformDirection(Vector3.forward * 4);
}
}
}