How to rotate a part in tool without moving a player

So I been trying to make a minigun.

While making it I thought of the barrels spinning while the player fires the minigun but came into a error while making it.

I tried to use CFrame to rotate the barrels but end up rotating the player with them but seen this done with other games and don’t think that using welds is best idea so if anyone can help me out here.

You can use Motor6Ds and add an AnimationController, then simply animate the tool as if it were a rig. Alternatively, your issue might be caused by the way you’re welding the parts, can you show me how you’re welding stuff currently?

1 Like

I use one of the qweld scripts to weld all parts together

Did you try CFraming the weld’s C0/C1 properties or the parts’ CFrames directly?

If you CFrame the part directly, that’d explain why the whole model moves; as the tool is welded to the player’s arm.

That’s likely the issue, you should weld the barrel to the handle rather than welding things to each other. You should be able to rotate the weld between the handle and the barrel freely without affecting the player holding the tool.

EDIT: Don’t forget to weld the pieces of the barrel to the barrel as well.

When ever I weld stuff together it always falls apart :confused:

There are plugins that help make it easy to do in studio. You should be welding things like this in studio anyways because it can impact the game at runtime, specially when you have lots of stuff being welded by scripts that could otherwise be welded in studio.

2 Likes

So do I weld the barrel to the handle and what about other parts