Lock a part to a curve

So I’m trying to make a gun system for my VR game, and when I insert the magazine I want it so it will lock it to this curve; so basically the magazine can’t move to the side or anything when I move my hand but it moves to this curve. I have no clue how to make it so if someone could help me that would be greatly appreciated. Thanks.

Update: got it to work with prismatic constraints.

2 Likes

I suck at scripting but if you know a bit this is what you can do, what you can do is teleport the hand model to where the mag is going to be inserted, then make the hand not able to move x, and z axis

hope this helps and if you don’t understand I can explain it better for you