private void OnTriggerEnter(Collider other) { if (other.tag == GameTags.Player) { PlayerFunctions pFunc = other.gameObject.GetComponent <PlayerFunctions>(); pFunc.CheckPoint = gameObject; pFunc.IncrementCheckpointCounter(gameObject); } }