My robot self-destructed

My robot’s drivetrain completely broke after yesterday’s robotics session. we have already tried stoppers and other… things, but the shaft always finds a way out of the motor. We have a chain-style drivetrain, and I might be able to send pictures tomorrow, but can you guys bounce some ideas around???

You always want two shaft collars, one on the side of the motor and one on the outside of the gear/ sprocket. Everywhere else should be screw joints, and you NEED spacers. If you do all of this, it cannot fall out. Ever.

No acc the shaft coller thing is wrong, you only need 1 shaft coller on anywhere that is covered from 1 side to another side, ill show my settup as an example (the bigger black spacer looking thing is my shaft coller)

No need for two threads.

Add beams, spacers, and shaft collars to make sure there is basically no space for it to fall out.