How to set a fixed camera perspective

I want to know how to change the camera from the player camera to a part things like

local camera = game.Workspace.Camera
camera.CameraType = Enum.CameraType.Attach
camera.CameraSubject = Part

doesn’t seem to work.

Did you define the variable “Part”?

I believe You can change the camera’s CFrame / Position to a specific part by getting the CFrame of the part specified using this.

and the camera for the player is specified as CurrentCamera in workspace. Not Camera

local camera = workspace.CurrentCamera
camera.CFrame = Instance.CFrame