Why my players health not reducing?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerHealth : MonoBehaviour

{
    [SerializeField] float hitPoints = 100f;

    public void TakeDamage(float damage)
    {
        hitPoints -= damage;
        if (hitPoints <= 0)
        {
            Debug.Log("You dead, my glip glop");
        }
    }
}

It should work if you call TakeDamage() with the damage property, how do you know its not working? Is the function beeing called? Try this to check:

public void TakeDamage(float damage)
     {
         Debug.Log("hp before: " + hitPoints + "  - " +damage);
         hitPoints -= damage;
         Debug.Log("after: " + hitPoints);
         if (hitPoints <= 0)
         {
             Debug.Log("You dead, my glip glop");
         }
     }