How to change camera position

It’s simple, I tried to get the camera to change to a perspective of another part. If the object was just “part” how would I do it?
I already tried to use CFrame but I am not sure whether to use CurrentCamera or something else

I believe this should work

local cam = workspace.CurrentCamera
local part = workspace.Part

cam.CameraType = Enum.CameraType.Scriptable
cam.CameraSubject = part
cam.CFrame = part.CFrame

Make sure to make the front surface of the Part face the direction you want it to, so that you can get the right view for the camera.

1 Like

You don’t need to set the camera subject to the part, all that does is make the camera orbit that part instead of the player’s head.

1 Like

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