The front is lined up but the camera doesn't move to the place fully, its normally off center or won't fully move there.
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera Camera.CameraType = Enum.CameraType.Scriptable for Num = 0,.7,0.1 do Camera.CFrame = Player.Character.HumanoidRootPart.CFrame:lerp(workspace.Desk.Hi.CFrame,Num) game:GetService('RunService').RenderStepped:wait() end
thanks,
You need to lerp all the way to '1' unless you only want it to get 70% there. If you want it done in exactly 8 steps (7 waits), you'll need to change the 'step' value accordingly. Do note that you should assign the CFrame to the final value after the loop is done to ensure that it worked properly (in case the for loop doesn't run with Num == 1
, which may happen depending on what step value you give it).
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera Camera.CameraType = Enum.CameraType.Scriptable for Num = 0,1,0.15 do Camera.CFrame = Player.Character.HumanoidRootPart.CFrame:lerp(workspace.Desk.Hi.CFrame,Num) game:GetService('RunService').RenderStepped:Wait() end Camera.CFrame = workspace.Desk.Hi.CFrame
Just use cam:Interpolate()
local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Camera = workspace.CurrentCamera Camera.CameraType = Enum.CameraType.Scriptable Camera:Interpolate(workspace.Desk.Hi.CFrame, workspace.Desk.Hi.CFrame*CFrame.new(0,0,-1), 5)