Hi, no problem, for future reference please don’t post your entire game to the devforum. I’m just helping because you’ve got a super specialized issue and have spent hours figuring it out (I know the pain )
By what I can see your problem isn’t an issue with my code, its just a quirk to how weld constraints work.
(you do want to use :Inverse() as if you don’t your attachments will be placed backwards lol)
Here’s the attachment function in question. Note that you are instancing the weldconstraint and properly welding it before you position your attachment.
When your attachment is cloned, its essentially placed randomly in the world, when you weld the attachment to your attpart, it makes an unbreakable bond where if you move the attpart or the attachment then it will move the other part sometimes the attpart
To understand the issue further i’ve drawn up a few small sketches
the red dot is your attpart, the green dot is your suppressor mount attachment
This is after you weld, but before you position your attachment
Then once you position your attachment, because the attpart is welded to the suppressor it will move.
This is after the attachment is positioned
Now imagine you try to add another suppressor, or a sight, because the attpart isn’t in its correct position, it will “break”
Ok, we understand the problem, now how do you fix it? Quite simply, you literally just weld the attachment to the attpart after positioning it.
Aaaaand shabinga! Now you can put your aimpoint and camo suppressor on your gun!