Tween taking the longest way for rotation

I have a camera system that uses tweens who can rotate at the player’s axis , the problem is that when the camera needs to move to -90 degrees the tween takes the longest way

local function cameraRot()
	
	local rotTweenCameraInfo = TweenInfo.new(
		0.075,
		Enum.EasingStyle.Linear,
		Enum.EasingDirection.Out,
		-1,
		false,
		0
	)

	local rotGoal = Vector3.new(-45, CameraPartRotY, 0)

	local rotTweenCamera = TweenService:Create(CameraPart, rotTweenCameraInfo, {Orientation = rotGoal})
	rotTweenCamera:Play()
end

local function cameraPos()
	if CameraCycle == -1 then
		CameraCycle = 3
	end

	if CameraCycle == 0 then
		CameraPartPosX = 10
		CameraPartPosY = 0
		CameraPartRotY = 90
	end

	if CameraCycle == 1 then
		CameraPartPosX = 0
		CameraPartPosY = -10
		CameraPartRotY = 180
	end

	if CameraCycle == 2 then
		CameraPartPosX = -10
		CameraPartPosY = 0
		CameraPartRotY = -90
	end

	if CameraCycle == 3 then
		CameraPartPosX = 0
		CameraPartPosY = 10
		CameraPartRotY = 0
	end

	if CameraCycle >= 4 then
		CameraCycle = 0
	end

	local tweenCameraInfo = TweenInfo.new(
		0.075,
		Enum.EasingStyle.Linear,
		Enum.EasingDirection.Out,
		-1,
		false,
		0
	)

Use multiple tweens across the designated path you want to take

1 Like

can you give me an example please?

He means, after the camera turns, use another tween to turn it back

When you make a tween, you add the time it lasts, and obv it will be long, so if you add multiple tweens , it will be faster