How bad? 500s? Bad. What's your credit history - a bunch of slow-pays, some collections, recent bankruptcy, high debt-to-income?
Your credit is usually trying to tell you something. If you've got bad credit, it's usually because you're not paying your bills on time. Taking on a humongous bill that wants to be paid on time for thirty years is as good an idea for someone with bad credit as running a half-marathon is for a couch potato.
Ideally, you get your credit (or your body, for the couch potato / runner) into shape by getting into a training routine. For you, that routine is getting your bills paid on time and paying down that debt. Then, and only then, should you be buying a house.