i’m creating shooter so now i’m making health scipt so what i want right now: i wrote script that reduce health if object hits and i want to reduce health if object with tag “Player” hits it. i hope i’ve asked the question correctly.
using UnityEngine;
using System.Collections;
public class Health : MonoBehaviour {
public PlayerHealth minusHealth;
void OnTriggerEnter (Collider other) {
minusHealth.curHealth -= 10;
}
}