I have two parts (the ones marked with the attachment at the end of the wire). I am trying to put an attachment in-between these two wires so i can use AlignPosition on it. The attachment doesn't seem to be going in-between the two parts, and instead positions near the player.

if not midattach then
   midattach = Instance.new("Attachment",e)
   midattach.WorldPosition = (q.Position + e.Position) / 2
   midattach.Name = "midAttachment"
end
ap.Attachment1 = midattach

gif showing problem