Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does the camera only tween the position and not the foucus?

Asked by 3 years ago

So I am working on a main menu for my game using camera tweening for smooth effect. Yet when I play the tween in game, it only ends up tweening the camera position and not the focus. Is there a way to fix this? Thanks in advance!

local camera = game.Workspace.CurrentCamera
local TweenService = game:GetService("TweenService")
local tween = TweenService:Create(
    camera,
    TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut),
    {
        CFrame = CFrame.new(-306.25, 165.688, -126.38),
        Focus = CFrame.new(-338.641, 160.125, -138.161)
    }
)

--Later in the script--

tween:Play()

(I cut out the rest of the script because the rest is for gui and not the camera)

Answer this question