Attachment slowly falls down from meshpart

I’m trying to fire lasers from the ‘muzzle’ of a gun viewmodel. The issue is the attachment seems to be slowly moving down, while still following the viewmodel:

In the video I’m just clicking to add more beams to the workspace, where the beam attaches to the muzzle attachment position. As you can see the beam is created in a slightly lower position every time, while still following the model on all axes, even the vertical one. moving the camera up also moves the attachment up, but it remains offset. Printing the position of the attachment shows it slowly moving downward, so that’s definitely where the issue lies.

the attachment is attached to the viewmodel like so, it’s parented to the meshpart.
image

1 Like

Attachments can’t “move” on their own, so this is either a visual-physics problem (the gun might not be anchored) or a script is changing the Position of it

1 Like

Thanks! The gun not being anchored was the problem. Does this mean you’re only really supposed to use attachments on anchored parts?

1 Like

No, attachments have their own use. Start your deep dive into constraints and you’ll see. However, here, you’re setting the part’s CFrame every frame to the camera. Physics still apply on it since its unanchored, and that’s unwanted behavior

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.