HingeConstraint not working well with target angle set to a part y Orientation

Ok so, I’m making a radar and I want it to lock on a part, I’m creating a new part and I set the CFrame to CFrame.new(radarmainpart.Position,target.Position) and then I’m taking that part Y rotation and I set it as target angle in a hingeconstraint, the problem is that when the Y rotation is negative it doesnt go where I want it to go.

robloxapp-20200830-1645427.wmv (4,2 MB)

Here’s my code:

local part = Instance.new("Part")
part.Anchored = true
part.CanCollide = false
part.Transparency = 0
part.Parent = workspace
part.CFrame = CFrame.new(workspace.RadarTransmitter.Position,x.Position)
				
wait(.1)
local y = math.deg(math.rad(part.Orientation.Y))
				
workspace.HingeConstraint.ActuatorType = Enum.ActuatorType.Servo
workspace.HingeConstraint.TargetAngle = y
part:Destroy()