void OnTriggerEnter(Collider other) //set current checkpoint to this { if (other.gameObject.tag == "Player" && other.gameObject.GetComponent <Player>()) { CPmanager.setCurrentCheckpoint(other.gameObject.transform.position); //this.GetComponentInChildren<MeshRenderer>().material = cpMaterial[1]; //set alt colour when activated } }