CAR SOMETIMES WONT START

1996 Nissan 200SX • Automatic •

My 1996 nissan 200 sx sometimes wont start, sometimes it does. I have to sit there turning the key, waiting, and retrying until eventually it starts. The problem seems to be getting worst and I have to sit there longer until it will start. Sometimes I can hear a rapid ticking/buzzing sound when I turn the key but it wont start. Im afraid eventually it will stop starting altogether. Battery? Alternator? Starter? Help pls.