arghhhh on 1999 Hyundai Accent

sometimes my car starts fine and other times it doesnt start it turns over but that is it,so i usually wait about ten mins and it will start again,what the heck?

Check for a bad battery cell. Take to parts store and have them test. Then, check for bad grounds. If none of the above, you probably have to poke around and just look at wiring that could be suspect.
1 more answer
It is the crank position sensor... I had the same problem.