if your g36 has been used alot, Like over 50k rounds, and depending on what year it was manufactured. I can allmost guarantee its your Plastic bushings are giving out, or your wiring contacts failing.
I highly doubt its your motor, that is becuase the JG, and Echo1 clone motors are Some of the most reliable motors on the market, They can handel anything you throw at them and I'v rarly seen one burn out.
If the Gear box has been worked on previously, that could be your problem but i highly doubt it.
Like was mentioned, try a different battery and if it is still the same result, take it some where and get it fixed.
I can allmost guarantee its eather the bushings, Or wiring harness failing, as that is the most common problem that causes that version gear box to just make the click click in the Grip area of the gun.
Or it could be the dumbest problem in the world, with your trigger disenguaging on the contacts prematurly, Or a broken anti reversal latch.
little more info would help alot more.