Rigidbody2D is not set to kinematic, OnTriggerEnter2D is spelled correctly and my box collider 2D is a trigger, and its not working…
using UnityEngine;
using System.Collections;
public class Damage : MonoBehaviour {
public float Damage2 = 50;
public AudioSource SoundEffect;
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player")
{
other.GetComponent<HealthSystem>().Damage = Damage2;
SoundEffect.Play ();
}
}
}