You need a new bulb.
What is happening is that the filament in the bulb is broken but sometimes when it gets hot and you go over a bump it attaches it self to the other side and it will work. That's why they say if your headlight were ever to go out to give it a few smacks and usually it comes back on. Its a temporary fix.
__________________
-Dario
Di
Splace
Ment Replacement
IF YOU NEED ANYTHING FROM CHASE PM ME!!