How would I stop beam Orientation with Parts

I have a beam in my game where Face Camera is turned off, and both of its attachments are set to an orientation of 0, 0, -90. The beam is connecting two parts using these attachments.

The issue is that when one of the parts rotates, the beam rotates along with it. I understand this happens because the attachments are linked to the parts, and their orientation adjusts based on how the parts move or turn.

What I want to know is:

  1. Is there a way to keep the beam from rotating when the part also rotates?
  2. If not, can I solve this problem using scripting?

Image with Orientated part and beam:

I believe you can counter-rotate the attachment to fix that.

How would I counter-rotate the attachments?

You can try setting the segments to 1. This would remove the twisting but, unfortunately, I believe it will still “rotate” (it will at least be a straight line).

Just have both attachments in the same part

you can rotate attachments if you select them