Not sure it can be done while riding. Problems down there can be many things, such as crank/crank bolts, chainring bolts, and pedal spindles. What symptoms are you experiencing? Perhaps the bicycle mechanics forum would be a better place for this question.