Lock Camera Onto A Part (Quick Question)

I’m trying to lock the player’s camera onto a part but I can’t find out how. I’ve tried changing the player’s CameraSubject to the part but the player can still move the camera around the part.

If you have any ideas or solutions I would love to know.

Thanks if you could help :slight_smile:

Use camera’s CFrame? Im not sure I have not experiemented with this before,
but I think its the Camera’s CFrame and subject.

You can continuously set the camera CFrame to the parts CFrame in a renderstep connection.

Would this work?:

local Camera = game.Workspace.CurrentCamera
local Part = --Put part here
	
Camera.CameraType = Enum.CameraType.Watch -- Change this to fit your needs if necessary
Camera.CameraSubject = Part

It’s pretty much the same as my problem. The camera subject is set on the part but I can still rotate my camera around the part. Thanks for the reply though and I would love to know what you think!

If you set the CameraType to Enum.CameraType.Scriptable the camera will be non-moveable.

1 Like