Ive been following brackeys tutorial on shooting with raycast and there an issue in my script

im new to unity and im following brackeys video on shooting with raycast (Shooting with Raycasts - Unity Tutorial - YouTube) and i cant find a diffrence with my and his.
im having a problem where the crate doesnt destroy after 5 clicks (5 clicks because my gun does 10 damage and the crate has 50 health). i dont know if this problem is in the gun script or target script.heres the codes and i hope i posted in the right area first time.

GUN

using UnityEngine;

public class GUN : MonoBehaviour {

public float damage = 10f;
public float range = 100f;

public Camera fpsCam;

// Update is called once per frame
void Update () {

    if (Input.GetButtonDown("Fire1"))
    {
        Shoot();    
    }

}

void Shoot ()
{
    RaycastHit hit;
    if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range))
    {
        Debug.Log(hit.transform.name);
    
        Target target = hit.transform.GetComponent<Target>();
        if (target != null)
        {
            target.TakeDamage(damage);
        }
    }
}

}

Target
using UnityEngine;

public class Target : MonoBehaviour
{
public float health = 50f;

public void TakeDamage(float amount)
{
    health -= amount;
    if (health <= 0f)
    {
        Die();
    }
    // } ?

    void Die()
    {
        Destroy(gameObject);
    }
}

}

Works for me.
Maybe the target is too far away, has no collider or is not in the center of the screen?
Also some lines are not formatted as code here in the question, but you could still edit it.