How would I animate a gun

I want to make the slide go back during a shot and have the mag come out during a reload. How would I do this? Ive tried rigging and using the animator but I dont think I rigged properly because it wont work. Any ideas or tutorial links would be great

Headstackk made a tutorial on this
How to animate Tool Parts (Guns, Knifes etc.) - Resources / Community Tutorials - DevForum | Roblox