Hi there
Electrics can be a nightmare. You need to post way more information in order to troubleshoot the problem. Have you wired everything up correctly? Have you got a wiring diagram for your bike? Are the earths OK? Have you tried a different spark plug/cdi/coil? Is there a sidestand switch? Stuff like that.
Cheers
Mike