How do I change the player camera to be the CFrame of a part?

How do I change the player camera CFrame to be the CFrame of a part?

the first arg in here will be the PART CFrame the second will be the Face/Target that you want your camera to point to.

game.Workspace.CurrentCamera = CFrame.new(game.Workspace.Part.CFrame,game.Workspace.TargetPart.CFrame)

This should work for you :==

local camera = workspace.CurrentCamera
local part = workspace.Part

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()


camera.CameraType = Enum.CameraType.Scriptable
wait(1)
camera.CFrame = part.CFrame
1 Like

were do i put the local script?

To StarterPlayer → StarterPlayerScript

Camera.CameraSubject = workspace.Part
https://developer.roblox.com/en-us/api-reference/property/Camera/CameraSubject