Raycast2D Hitting Collider of object I'm raycasting from?

Hey everyone, right now I’m trying to send a raycast from an enemy in the direction of my player but it seems the raycast is hitting the collider on my enemy and triggering.

Vector2 vecToPlayer = m_pTarget.transform.position - transform.position;
RaycastHit2D hit  = Physics2D.Raycast(new Vector2(transform.position.x,transform.position.y),vecToPlayer);
if(hit.collider.gameObject==m_pTarget )

This is all I’m doing but currently hit.collider is equal to this.collider. Is there any way to ignore my collider?

Give it a layerMask and tell it to ignore ‘this’