Need help with simple mechanism

plastic gun opener.blend (1.2 MB)
Need help with the mechanism, Im not trying some complex mechanism, just i want the clutch to be press and the inside rod should come out and when clutch is release the rod should go inside, Will im confuse how it will work. Where the spring and how it will be place and what else need to be added. Any suggestion plz. Thanks

You should ask this in the “Animation and Rigging”-Sektion.

First of all you need some bones and constraints.

This is one way to do it:

plastic gun opener2.blend (213.8 KB)

The IK target has a driver that changes its location with the local Z rotation of the trigger bone.

The stick that pops out it parented to the yellow bone with the IK constraint.

The trigger is parented to its bone.

To pose rotate the trigger bone on its local z axis. If you want the stick to move more or less change the maths of the driver.

I also parented the body of the gun to the armature (not to a bone, as object) so if you move/rotate the armature the whole gun moves.

Thanks for the detail, but im looking for a model not animation is later part, mean time i want to model with the spring where and what extra spring and parts needed.

Ahh, Ok. I was wondering myself how the mechanism is supposed to work.
A quick search for “bang flag pop gun mechanism”, it is not a very good explanation but might help:

I think there are different variations of this mechanism.