Clomid and HSG

G

So I have done three rounds of clomid I ovulated but haven’t gotten pregnant so my doctor told me to go for a HSG and to still take the clomid has anyone ever had success with both of these? I have also read some people say their dr won’t do both at the same time why is that if you know?