ive been trying to make a destruction effect but the collision doesnt work
this is code:
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("Player"))
{
transform.position = new Vector3(0,-5,0);
Debug.Log ("yes");
}
}
help?
note: I’m an amateur at coding