private void OnTriggerEnter(Collider other) { if (other.tag == GameTags.Player) { PlayerFunctions playerFunctions = other.gameObject.GetComponent <PlayerFunctions>(); if (playerFunctions.CheckpointCounter == checkpointManager.AmountOfCheckPoints) { playerFunctions.IncrementLap(); playerFunctions.CheckPoint = gameObject; } } }