Hey, messing around with camera interpolation. I'm trying to get the camera to follow the path of parts I've made, it works for the most part, but the direction the camera is facing is messed up... Why?
wait(1) local scene = game.ReplicatedStorage.other.cutscene:Clone() scene.Parent = game.Workspace game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable local points = scene.tween_points:GetChildren() game.Workspace.CurrentCamera.CFrame = scene.tween_points["1"].CFrame for i=1,#points do game.Workspace.CurrentCamera:Interpolate(points[i].CFrame,CFrame.new(points[i].CFrame.lookVector),points[i].speed.Value) wait(points[i].speed.Value) end
The second argument of the Interpolate function should be a CFrame for the focus of your camera perspective.
If you make it the next consecutive point, then your camera will look at that point.
local cam = workspace.CurrentCamera; local scene = game.ReplicatedStorage.other.cutscene:Clone() scene.Parent = workspace cam.CameraType = "Scriptable" local points = scene.tween_points:GetChildren() cam.CFrame = points["1"].CFrame; for i=1,#points do cam:Interpolate(points[i].CFrame,points[i+1].CFrame,points[i].speed.Value) wait(points[i].speed.Value) cam.InterpolationFinished:wait(); end