This is probably obvious chum, but the ball will go into a hole, with a spring behind it, and will click into a notch or groove when the gear selector is in the right place. There will be a notch or groove for each position of the gear selector. More likely than not, the grooves or notches will be in a round object and the hole for the spring and ball will be in one or more objects (called gear selectors) that slide over the round object. As the one or more selectors slide along the rod, the ball or balls will click into each gear position. The spring(s) should be strong enough to hold the selector(s) in that position when the transmission is operating. Your original problem might have been due to a spring being too weak or missing altogether, or it might have been due to the lever's motion being restricted, or it might be that the gears were worn out, causing improper meshing. While you have the transmission in pieces you should check all of these possibilities. Especially, make sure there is a strong, consistent click for each gear position, and you can account for all of the balls and springs. They have really unpleasant effects if they get stirred through the gears, which they probably will sooner or later if they are laying in the bottom of the box.