,Why won't my raycast kill the enemy. It detects it is hit but the enemy never dies.

This is my gun script:

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.GetMouseButtonDown(0))
        {
            Shoot();
        }
    }

    void Shoot ()
    {
        RaycastHit hit;
        if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit, range))
        {
            Debug.Log(hit.transform.name);

            Enemy target = hit.transform.GetComponent<Enemy>(  );
            if (target != null)
            {
                target.TakeDamage(damage);
            }
        }
    }
}

And this is my enemy script:

using UnityEngine;

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

    public void TakeDamage (float amount)
    {
        health -= amount;
        if (health <= 0f)
        {
            Die();
        }
    }
    void Die ()
    {
        Destroy(transform.gameObject);
    }
}

Ran your scripts. Assigned Gun to Main Camera and Enemy to a 3D Cube. Once I set the Camera to have the Cube in the center of the scene, the Enemy script in the Inspector showed health drop by 10 each mouse click and disappeared after 5 clicks. Using 2019.4.17f1 build.