How to allow zooming in and out while spectating?

I want to allow people that are spectating to zoom in and out to their liking.

However, I don’t know how to allow this. I’m not sure if it’s a camera property I can turn on or if I have to script it to allow it.

I have tried to change my camera’s type to custom, watch, etc. but none make a difference.

The spectating system doesn’t spectate people but rooms, so the parts I use to spectate aren’t the player’s head for example but a block I anchored up in the sky.

local camName = script.Parent.Name
local cam = game.Workspace.Cameras:FindFirstChild(camName)

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local db = true
script.Parent.MouseButton1Click:Connect(function()
	if db == true then
		db = false
		Camera.CameraType = Enum.CameraType.Scriptable
		Camera.CFrame = cam.CFrame
		wait(.1)
		db = true
	end
end)

you can change the camera field of view so it “zooms” in and out.

Since you are setting the camera to scriptable and changing the Camera CFrame, and freezing it there. You gotta script the zoom by yourself.

You could not change it scriptable and dont change the CFrame, and just change the CameraSubject = "the part you wanna see in the room".
So you will have the zoom and the panning

2 Likes

I think this reply is better than mine so take this advice instead.

2 Likes

Will definitely try this, thank you!

1 Like