Maybe a switch gapped too close together or hold switch on an end of ball relay that's not releasing properly, and then by banging on the game it loosens up. If you hit the game on the playfield or cabinet somewhere would it also take care if it? I'd step through it with the playfield up to reproduce the issue and then see what relay is still engaged, and trace back to what would cause it to stay that way.