Change camera position

hi, i was wondering if there is any way for the player’s camera to point to a part that is in the workspace

In a localScript:

local Camera = game.Workspace.CurrentCamera
local Part = game.Workspace.Part -- rename "Part" with the part's name

camera.CameraType = Enum.CameraType.Scriptable
Camera.CFrame = CFrame.new(Camera.Position,Part.Position)
1 Like

This works too :laughing:

LocalScript:

local camera = workspace.CurrentCamera
local part = workspace.Part --Your Part
camera.CameraType = Enum.CameraType.Custom
wait(.1)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part.CFrame

If you want to set the Camera back to the Player, just use:

camera.CameraType = Enum.CameraType.Custom

Example:

local camera = workspace.CurrentCamera
local part = workspace.Part --Your Part
camera.CameraType = Enum.CameraType.Custom
wait(.1)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part.CFrame
wait(5) --After 5 Seconds Camera back to Player
camera.CameraType = Enum.CameraType.Custom

:smiley_cat:

10 Likes