Hey everyone!
I wanted two make a script that, given two parts (let’s call them partA and partB) with an attachment inside, would position the parts such that the CFrames of the two attachment coincide. Something like this:
I have made this script, which works but only for parts with the same orientation…
local partA = workspace.PartA
local partB = workspace.PartB
partB.CFrame *= partA.Attachment.WorldCFrame:ToObjectSpace(partB.Attachment.WorldCFrame):Inverse()
Any ideas on how to make this work? I’ve searched in the DevForum and the documentation for anything, but to no avail…
Any help is appreciated!!
EDIT: I want to specify that the script should consider the orientation offset of the attachment (ex. if partA’s attachment is tilted 60 degrees, then partB’s should follow that orientation)