Foundation sitting on top of skin

I have dry skin even though I moisturize every day. I also have acne scars and some pimples. When I put my foundation on even in a thin layer it looks cakey and sits on top of my skin and stands out and looks gross. Even with tinted moisturizer (which doesn't cover my scars either) I look so gross! I need tips! I have tried primer and setting spray too and it doesn't help! I use a flat top brush to put my foundation on.

Need advice asap.