Turret rotating the wrong way

I’ve modeled a turret and scripted it to point at targets, but it’s rotating very weirdly in the picture below.

	local function turnToPosition(position)
		print("pointing at position "..tostring(position))
		local goal = {
			["CFrame"] = CFrame.new(lowerRotator.Position, position)
		}
		local tween = TweenSservice:Create(lowerRotator, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), goal)
		tween:Play()
	end

Does anyone know how to fix this? Thanks to anyone who tries to help.

Your code seems to work, so it’s probably something specific to your rig. Can you provide the setup for your turret?

local TweenService = game:GetService("TweenService")

local function turnToPosition(position)
	local goal = {
		["CFrame"] = CFrame.new(workspace.SpawnLocation.Position, position)
	}
	local tween = TweenService:Create(workspace.SpawnLocation, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), goal)
	tween:Play()
end

while task.wait(.5) do
	turnToPosition(workspace.RedPart.Position)
end

This code yielded this result:


It’s not even a rig, just a bunch of parts welded together. The LowerRotator and UpperRotator part are anchored since I’m using tweening for them anyway.