This is what my code looks like (don’t judge, I am a total noob and am trying to follow a tutorial)
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
void OnTriggerEnter2D (Collider2D other);
(
if(other.tag == "Player")
{
Debug.Break ();
}
if(other.gameObject.transform.parent)
{
Destroy (other.gameObject.transform.parent.gameObject);
}
)
};