Camera Manipulation

So, I’m most of you are familiar with Jailbreak. In Jailbreak, they have a camera that pans over the city, over the prison, over the robberies, etc. Then, they loop it until you select what team you want to choose. I want to make something like that with camera manipulation. I just have no idea about how I would do that. I understand CFrame, just not how I would go about setting the user’s camera to the front end of a block and looping that tween. Or maybe that’s not even how you do it. That’s I envision it. Obviously, you can’t teach me how to completely manipulate a user’s camera through a simple reply, but if you have any youtube videos or previous DevFourm posts to help me out I would really appreciate it. I’ve looked and found nothing along the lines of what I’m truly looking for.

1 Like

Actually, it’s easier than it seems like it would be, so I probably can.

In a LocalScript, you set the user’s CameraType to Scriptable (due to a bug sometimes you have to loop this) and set the Camera’s CFrame to a part. Then you just manipulate the part and the camera will follow suit assuming a loop is constantly updating the CFrame.

local cam = workspace.CurrentCamera
repeat cam.CameraType = Enum.CameraType.Scriptable until cam.CameraType == Enum.CameraType.Scriptable
local camShouldMove = false
local camPart1 = workspace.CamPart1

repeat task.wait() until workspace:GetAttribute("MoveCameras") == true
camShouldMove = true
while camShouldMove do
    task.wait()
    cam.CFrame = camPart1.CFrame
end

Just a really basic example script.

2 Likes

I have a question can I use tween for this? If so, how would I do it can you please show me an example?

I think you might be able to get the same results of tweeting the camera if you tween the part since task.wait is pretty instant, but you can try to create the tween for the camera and the part at the same time and play them in one script. That’s a more complex script and I don’t want to give it out because it seems enough to make a commission on.