4.3 PowerUp and Countdown - Debug Log won't work neither would the Impulse force

private void OnCollisonEnter(Collision collision) {
if (collision.gameObject.CompareTag(“Enemy”) && hasPowerup) {

        Rigidbody enemyRigidbody = collision.gameObject.GetComponent<Rigidbody>();
        Vector3 awayFromPlayer = (collision.gameObject.transform.position - transform.position);

        Debug.Log("Player collided with: " + collision.gameObject.name + " with powerup set to " + hasPowerup);
        enemyRigidbody.AddForce(awayFromPlayer * powerupStrength, ForceMode.Impulse);

    }

what would i be missing in order to get the debug log message to appear that the two balls have collided with or without the powerup installed

Hey,

i guess like this:

private void OnCollisonEnter(Collision collision) {
        if (collision.gameObject.CompareTag("Enemy") ) {
            Debug.Log("Player collided with: " + collision.gameObject.name + " with powerup set to " + hasPowerup);
            if(hasPowerup) {
                 Rigidbody enemyRigidbody = collision.gameObject.GetComponent<Rigidbody>();
                 Vector3 awayFromPlayer = (collision.gameObject.transform.position - transform.position);  
                 enemyRigidbody.AddForce(awayFromPlayer * powerupStrength, ForceMode.Impulse);
            }
        }