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

Camera Tweening not focusing on Part?

Asked by
BloxRoxe 109
4 years ago

While trying to create a camera tween to direct the camera's focus on "cameraLook" and position at "cameraPoint", the tween does not actually change the camera's focus direction towards the "cameraLook". I may be overlooking this, but I can't find out the issue. The code is modeled after Roblox's Camera Tween Example.

local tweenService = game:GetService("TweenService")
local cameraPoint = workspace.GameTemplate["MiddleCam"]
local cameraLook = workspace.GameTemplate.Table.cardtemp["one"]

local camera = workspace.CurrentCamera
local tween = tweenService:Create(camera, TweenInfo.new(1.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),
    {
        CFrame = CFrame.new(cameraPoint.Position),
        Focus = CFrame.new(cameraLook.Position),
    }
)

tween:Play()

Answer this question