I would like than the camera heading to part named "B", how do I proceed?
repeat wait() until workspace.CurrentCamera wait() local target1 = workspace:FindFirstChild("A") local target2 = workspace:FindFirstChild("B") local camera = workspace.CurrentCamera camera.CameraSubject = target1 camera.CameraType = Enum.CameraType.Scriptable --local angle = 1 while wait() do camera.CoordinateFrame = CFrame.new(target1.Position) -- * CFrame.Angles(target2.Position) -- * CFrame.new(target2.Position) -- angle = angle + math.rad(.2) end
Thanks for your response !
Use Lerp:
for i = 0,1,0.01 do wait(0.01) camera.CoordinateFrame = camera.CoordinateFrame:lerp(target2.CFrame, i) end