Which game? It is not uncommon for the Cherry microswitches used in Bally/Williams games to have intermittent contact issues as they get old; there was also a batch of switches during the WPC-95 days that seemed particularly troublesome. How are you actuating the switch? With your finger or a ball?
Keep in mind in the case of rollover switches the switch actuator wire form can be shifted to the side when the ball rolls over it; using your finger to depress the wire form will produce more consistent results for switches that are on the edge of working, either due to internal issues with the switch or with the physical alignment of the switch and actuator wire form.
It's highly unlikely you have an issue with the wire harness, but double-check the connections at the switch to be sure they're in good shape.