What kind of car is it? Could be the main relay if it's an older honda, or the ignition switch itself. I had one that wouldn't start, and then 5 mins later it would. Finally figured it out, after I noticed it would start if you hold the key a certain way. The switch was all corroded inside.