"points" given while not on trigger,"points" keep going up but it didnt touch the trigger

i tried to make a system when the player touched the trigger a point would be given but even if it touched did not touch a trigger it will give points here is an example picture [154427-aantekening-2020-03-17-195637.png |154427]

i eould change scenes if it reached 8 “points” but first i tested it with a debug.log but… it did not work
here is the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Pointsssssss : MonoBehaviour
{
    // Start is called before the first frame update
 private int points = 0;
 
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (points == 8); {

            Debug.Log("you have 8 points");
        }
    }


void OnTriggerEnter(Collider other){

    points += 1;
}

}

have a nice day!,i tried to make a point system if you have 8 that you could go to the next level but it always goes up even though the trigger hasnt been entered this is a picture that has been taken of it [154427-aantekening-2020-03-17-195637.png |154427]

here is the code i used

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

public class Pointsssssss : MonoBehaviour
{
    // Start is called before the first frame update
 private int points = 0;
 
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (points == 8); {

            Debug.Log("you have 8 points");
        }
    }


void OnTriggerEnter(Collider other){

    points += 1;
}

}

have a nice day!

I have fixed up your code and added comments… PLEASE be sure to read the comments I added carefully so that you understand what you were doing wrong…

using UnityEngine;

public class Pointsssssss : MonoBehaviour
{
    int points = 0;

    void Update()
    {
        if (points == 8)// you had a random ';' here which was casuing issues
        {
            Debug.Log("you have 8 points");
        }
    }

    void OnTriggerEnter(Collider other)
    {
        //what is happening is you have not referenced what can trigger the collider
        //meaning even a stray cube that is touching the collider can add points
        //simply add an if statement asking if it is the player that touched the collider

        if (other.CompareTag("Player"))
        {
            points += 1;
            Debug.Log("The player touched the collider, Added 1 Point");
        }
        else
        {
            Debug.Log(other.gameObject.name + " Has Touched the collider, This is what was adding points!");
        }
    }
}

If you get a spam of logs saying “Something Touched the collider that is not the Player” that means the collider is clipping through the ground or a wall or something, simply make your trigger collider a little smaller so it doesnt clip any stray objects.