CameraPart is suppose to do a 180 turn but it doesn't, I tried the same script with another part that's not a camera part but it worked.
tween script:
local tweenService = game:GetService("TweenService")
local part = game.Workspace.CameraPart
local tweeningInformation = TweenInfo.new(
.5, --Length
Enum.EasingStyle.Cubic, --Easing Style
Enum.EasingDirection.Out, --Easing Direction
0, --Repeats
false, --backtrack
0 --tween delay
)
----------------
local partProperties = {
Orientation = Vector3.new(15, 90, 0)
}
local Tween = tweenService:Create(part,tweeningInformation,partProperties)
---------------
function onClicked(playerWhoClicked)
script.Parent.ClickDetector.MaxActivationDistance = 0
Tween:Play()
wait(.5)
script.Parent.ClickDetector.MaxActivationDistance = 9999999
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
script that sets the camera part:
wait(1)
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame
