Want collider to detect mouse clicks but not player collision

Hi I want colliders to use OnMouseDown without blocking the player’s movement… how can I do that? I tried making them triggers but OnMouseDown seems to stop working.

You can set different layers to collider and player and disable collision between them