How to return the camera to its original position?

Local1:

local camera = workspace.Camera
local currentCamera = workspace.currentCamera

camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = currentCamera.CFrame

This is part of a script in which when using the prompt, the camera switched to part, and showed the player from the side, I need to do that after that, the camera went back to the player and was as it is. How do I do that?

Local2:

local camera = workspace.Camera
local currentCamera = workspace.currentCamera
camera.CameraType = Enum.CameraType.Fixed

I tried that, but it didn’t work.

1 Like

The camera variable is unnecessary, as only workspace.CurrentCamera exists.

To move the camera, change the cameratype to scriptable and update the currentcamera’s cframe. To reset it, set cameratype to custom and cameratarget to your character’s humanoid.

2 Likes

I’m pretty sure all you need to do is

camera.CameraType = Enum.CameraType.Custom
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.