my zombie is not a target i cant fire at it

,when i fire at my zombie … nothing changes about the zombie although it has a 50 amount of health and a target script attached to it and i dont know what fire1 button is

can you attach your target, health script and fire script? So that I can help you look at it

The Fire1 button represents in Unity the left button of the mouse, also this can be verified if you go to Edit - Project Settings - Input and if you expand the list of Axes you will find an element called Fire1 that if you open it and look at the box "Alt Positive Button “shows” mouse0 "which represents the first element found in the mouse inputs (the left button).

Regarding the problem of the zombie must have a problem whether the script is linked to your projectile or the zombie script, it would be ideal to attach these two scripts so they can be analyzed but in any way you could be guided by the following:


private int m_Live = 50;

private void LifeManager () {
     if(m_Live <= 0) {

public void LifeReducer (int _damageAmount) {
     m_Live = m_Live - _damageAmount;


public int m_BulletDamage;
public float m_Power;

public Rigidbody m_BulletPrefb;

private void Update () {
     if(Input.GetButtonDown("Fire1")) {
          Rigidbody _bullet = (Rigidbody) Instantiate(m_BulletPrefb, transform.position, Quaternion.identity);
          _bullet.AddForce(transform.forward * m_Power, ForceMode.Acceleration);

private void OnTriggerEnter(Collider collider) {
     if(collider.CompareTag("Player")) {