It souns like your ignition is not working right. Because you said when you tap it, it sometimes works, it makes me think it is killing the spark sometimes.
A good test would be to pull the plugs and watch to see if it is sparking when you use the electric start (with the plugs grounded to the motor)
If you find it is nt always sparking, then just replace the ignition
Hope this helps.