private void OnTriggerEnter(Collider other) { // Check if current checkpoint is active, and if the passed object was the player's ship if (isActiveCheckpoint && other.name == "PlayerShip") { passLight.intensity = 8.0f; passLight.color = Color.green; // Call a function in the RaceController raceController.CheckpointPassed(); isActiveCheckpoint = false; } }