Else Statement Not Working

I’m checking to see if an object is in front of another before continuing, and this works. But when I try to do an alternate action for when the opposite happens (they’re behind), it will always do the latter. Any help out there? I can not figure out why this doesn’t work and it’s driving me insane.

What should happen is that if we’re not blocking, get hit by the ball. If we are blocking and facing the ball, do the action, if we are blocking and not facing the ball, get hit. But instead, if we’re blocking, it always hits and never catches - regardless of if they’re in front of us or not.

function OnTriggerEnter(hit : Collider){
	if(hit.gameObject.tag == "Ball"){
		var toTarget = (hit.transform.position - transform.position).normalized;
		
		if(!isBlocking){
			GetHit();
		}else if(Vector3.Dot(toTarget, transform.forward) < 0){
			CatchBall();
		}else{
			GetHit();
		}
	}
}

I figured it out. What happened was that the ball was being caught properly the entire time, it just hit the player afterward because the else statement did not check if the ball had been caught or not. Everything is fixed now, thanks for the help.