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)