First its better to have normalized vector:
(TargetPosition - GlobalTransform.origin).Normalized().Dot(FacingDirection)
Target - GlobalTransform is vector of attack
Facing Direction is forward vector of my character
Then you need to check if that dot value is in some range. I did it as degrees angle in properties for easier setup. But Dot product is not really an angle in degrees so there goes cosinus:
ArcOfBlock = Mathf.Cos(Mathf.Deg2Rad(ArcOfBlock / 2f))
And if your new ArcOfBlock is less than DOT then it hits.
Divide by 2 because DOT is symmetric.