Need help rotating camera

Hello
My gui divides the screen by 3.


If my cursor is on label 1, it rotates left. If on label 2, rotates back to the middle.

Problem


(yes, it’s a toilet)
As seen, everything is ok with label 1. But if I hover my cursor on label 2, it rotates back to middle after a 360 degree turn. I don’t want that.

Script
local label = script.Parent
local player = game.Workspace.Gameplay.Character.Player_Cubic
label.MouseEnter:Connect(function()
	print("Cursor entered the middle label")
	local TweenService = game:GetService("TweenService")

	local part = game.Workspace.Gameplay.Character.Player_Cubic

	local goal = {}
	goal.Orientation = game.Workspace.Gameplay.Character.Player_Cubic.LookingMiddle.Orientation

	local tweenInfo = TweenInfo.new(0.5)

	local tween = TweenService:Create(part, tweenInfo, goal)

	tween:Play()
	
end)

label.MouseLeave:Connect(function()
	print("Cursor left the middle label")
end)
Additional Information

This game doesn’t use roblox’s default character controller. I’m creating something like FNaF 4’s controller.
Player is made out of a single cube, and the camera moves with it.
image

i think its best to not use parts to tween on, it’s just better to do it by script.

1 Like

How do I do that with parts

qw

i think it would be something like

middle = Vector3.new(0,0,0) --insert some numbers here for your rotation
goal.Orientation = middle

instead of using a part’s orientation. just experiment with the numbers and you should be good. if the problem continues then it’s something else.

1 Like