if (!(gameObject.CompareTag("Player") && other.CompareTag(scoreObjectTag))) { HandleScoreCollision(other.gameObject); } else if (!(gameObject.CompareTag("Player") && other.CompareTag(gameOverObjectTag))) { Debug.Log("Game Over object collided: " + other.gameObject.name); // Add a debug log for game over collisions EndGame(); }