LocalScript
local cam = workspace.CurrentCamera
local camp = workspace:WaitForChild("CameraPart")
cam.CameraType = Enum.CameraType.Scriptable
cam.CameraSubject = camp
cam.CFrame = camp.CFrame
cam.FieldOfView = 70
For a local player, you need to use the "CurrentCamera", which you cannot use :WaitForChild() on (without creating an infinite yield)
Next, to prevent glitches, use the Enum of the CameraType rather than the string (even though it will work most times)
Finally, the camera's CFrame needs to match the part's CFrame so they are not too far away from each other, otherwise, the camera stays in place but changes its orientation only to match the CameraSubject
1 comment
Dude thanks so much!