I’m trying to create a drag part system similar to lumber tycoon 2, and I’m using OrientationAlign object so the part keeps the same orientation.
But I’ve realized that if I set the orientation of the part that holds the Attachment1 of OrientationAlign to something like CFrame.Angles(X,Y,0) the OrientationAlign will try to keep the part at 0 orientation on Z axis.
I don’t know how to work around this, any help will be appreciated.
local GivenCFrame: CFrame = -- cframe goes here
local GivenPosition: Vector3 = -- put the position of the cframe here
local _, y = GivenCFrame:ToOrientation()
alignOrientation.CFrame = CFrame.new() * CFrame.Angles(0, y, 0)
That kinda works, but in my case, im trying to make part dragging system and whenever a part is rotated and put down, when i pick it up again, it doesn’t retain it’s position but it goes to default position which is 0,0,0…