Hello, i’m new to unity and I’m trying to make a new object appear after a collision, but i’m getting an error on this code plus I really have no idea how to add the collision as a trigger for this, at least inside the code.
using UnityEngine;
using System.Collections;
public class RandomPlacement : MonoBehaviour {
public GameObject MUG2;
public Vector3 spawnSpot = new Vector3(0,2,0);
void Start() {
GameObject MUGSpawn = (GameObject)Instantiate(MUG2, new Vector3(0,2,0), transform.rotation);
}
void Update() {
}
}