void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { if (cm.CheckCheckpoints() && !finished) { if (currentLap == lapsToRun) { finish.Invoke(); } else { currentLap++; cm.NextLap(); lm.SetLapCount(lapsToRun, currentLap); } } } }