I’m trying to make a script that changes player’s camera CFrame then turns back to the original CFrame. But the camera view when resetting back is not like the original.
This is my local script:
local testpart = workspace:WaitForChild("testpart")
local db = false
local cam = workspace.CurrentCamera
local originalcam = cam.CFrame
testpart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChildOfClass("Humanoid") and not db then
db = true
cam.CameraType = Enum.CameraType.Scriptable
cam.CFrame = cam.CFrame * CFrame.new(10000,1000,1000)
task.wait(2)
cam.CFrame = originalcam
cam.CameraType = Enum.CameraType.Custom
task.wait(5)
db = false
end
end)
In the vid, the view turns back to the side instead of behind the player.