Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how do I edit how zoomed in a camera is?

so I'm making a main menu which is going to manipulate the camera to follow a target already got this part down my only problem is is that its too close to the part I want it to zoom out more to see the actual map how can I achieve this? I've tried resizing it but that kind of screws up the camera

1 answer

✓ Accepted answer

I'm not for sure if what you use but I'll give a simple example. (next time including your code would be very useful)

local target = --Insert your target here that you want the camera to follow
local camera = workspace.CurrentCamera -- Your camera
camera.CameraType = Enum.CameraType.Scriptable -- Sets camera type to scriptable (don't have to do this)
camera.CameraSubject = target 
local angle = 0
local go = 0

game:GetService("RunService").RenderStepped:connect(function()
	camera.CoordinateFrame = CFrame.new(target.Position)
						   * CFrame.new(0, 0, 25) -- This changes the position of the camera, probably what you're looking for so payattention to this part. The last number changes the length away from the character
	go = 1
end)

In that script above it is basically finding the character, centering the camera on it's head and then moving it away around 25.

Here is the wiki for more info on Camera manipulation http://wiki.roblox.com/index.php/Camera_manipulation

This discussion is preserved as it was. New answers, comments, and votes are closed.