IF it has a 1d 3 up shift pattern then there used to be a special shift star fix kit ..
IF it's a 4 up shift engine and you haven't dropped the bike and bent the shift lever or shift shaft ... Then you've most likely either ... broken off or rounded the dog lugs OR thinned out the shift forks from riding with pressure on the shift lever ...
IF you HAVE bent the the lever or shift shaft at any time then you've most likely BENT the selector or shift forks so the dogs aren't getting pushed deep into the slots of the corresponding gear ... allowing them to jump out and also cop damage in the process ...
You can buy a complete new set of gears from DHZ for $45 ... as long as your engine starts in any gear ... if it has the clutch on the crank (starts in neutral only) then you'll have to scab spares from a donor motor ... unless you can find someone who sells replacement trannies for those types of motors ...