well lets start by diagnosing the problem. check all your wires and connections (most obvious thing to start with first). Second see if you have a spark?(pull plug out, find a clean surface on the head and crank it over, if its a fat blue spark, your Stator is good, and that will also tell you your cdi box is good.
What are you wrenching on? year/make/model
Im not by any means an atv/dirt bike mechanic but have learned abit here and there and have learned a few things talking to people
1 thing i was told if your stator goes, there is a chance it could retard your cdi box and set the ignition timming off....
But check your spark and get back to me with what your spark is like and anything you have tried and from what i have done myself and have learned from others i will try and help the best i can(everyday i learn something new)
feel free to email me if you would like