variable changes for no reson,this var keeps going down? for no reson?

,if (Vector3.Distance(transform.position , Player.transform.position) <= 0.6)
{
if (knockcount == false)
{
srpt2.Health–;
knockcount = true;

                rb.AddForce (Dir.normalized * knockforce * Time.deltaTime ,ForceMode.Impulse);
                
                StartCoroutine("Wait");
           
            }

somthing wierd is happening the health var just keeps going down for seemingly no reson! HELP!

So I can’t tell for sure but I can see some potential problems with your code. Do a bracket check it seems the first if statement does have a matching ‘}’ which could be due to how you copied in your code. But in general use Debug.Log(“My message to print”); to track what is happening in your code. @tytywithasword10

On Line 5 you’re making the Health variable of srpt2 subtract 1.

srpt2.Health--;