Make sure every piece of the ignition is making good contact, like if you painted the cases, clean the paint off the little tabs where the stator mounts so it will be good metal to metal contact. Do the same for the coil, because those contact points could be rusted from sitting.
Normally 9 out of 10 times on the stock OEM TRX ignition system, it is the connectors in the wiring harness not making good contact. You look at them & they look fine, but its hard to see the how dirty they are because they look clean. Might can take a pair of needle nose & press on them a bit to tighten them up.
Mounting points for the engine need to be clean as well, metal to metal.
Neil