Honda crf/xr 50 help

he was drifting in the leaves not giving it too much gas and it just shut off..its a bbk...i just looked and seen some electrical tape that covers the wiring harness melted.. tht might be the problem as it is getting no spark...it also has a rev box hooked in..im going to take a better look tomorrow when i have more room in the driveway ..ill let you know...