Checking if a knob is on the left/right side of a double door

So I’ve set my double door up, but need to make sure the right handle’s tween is inverted, as otherwise it goes the wrong direction.

image

I attempted to do this with a ToObjectSpace statement

if currentKnob.CFrame:ToObjectSpace(doorModelBoundingBox).Position.X > 0 then

However, since the right door is actually a invert of the left door, that means it’s relative space also changed, making this check not function as intended, causing it to fire onto all handles

im not 100% sure if this is what you where trying to achieve and i cant guarantee this is the best way but this is what i came up with:

local CheckSide = function(From:BasePart,To:BasePart,Dir:string)
	return CFrame.new(From.Position,To.Position).LookVector.Unit[Dir] > 0
end

Side = CheckSide(workspace.Door1,workspace.Door1.Knob,"X")

the Dir(Direction) is relative to the from part true being left, false being right and should work no matter the orientation of the door itself because its a look vector sorry if its not exactly what you wanted.