I am making a 2d game. and in this 2d game im trying to make it so that when the player tuches the lava he dies and im not getting it to work.
using UnityEngine;
using System.Collections;
public class Collision : MonoBehaviour {
void OnCollisionEnter2D(Collision2D coll) {
if (coll.gameObject.tag == "Lava")
gameObject.destroy;
}
}
this is what im trying to fix.