using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Collections.Specialized;
using UnityEngine;
public class Randm : MonoBehaviour {
public GameObject [] Myobj;
public GameObject obj1;
//void Start(){
void OnTriggerStay(Collider col){
if(col.gameObject.tag == "777"){
int ran = Random.Range (0, Myobj.Length-1);
Vector3 MMM = new Vector3(-1.2f, 4.7f, 4.7f);
GameObject newMT = Instantiate (Myobj [ran], MMM, Quaternion.identity);
newMT.transform.position = obj1.transform.position + transform.forward;
}
}
}