Engaging Core NOT Hip Flexors

Any tips on engaging my core during workouts without working my hip flexors. Even when I do ab-focused exercise, my hip flexors seem to take over and start to hurt. I'm not sure what to do. Any tips would be helpful.