So I've disabled camera usage in my game, but I still want them to be able to zoom in and out and rotate their camera, I don't know if this is possible and I couldn't find any tutorials. Can anyone help?
This is my script:
local offset = Vector3.new(-5,50,0)
local fieldOfView = 50
local player = script.Parent.Parent
local camera = game.Workspace.CurrentCamera
local runService = game:GetService("RunService")
camera.FieldOfView = fieldOfView
local function onRenderStep()
local playerPosition = player.Character.HumanoidRootPart.Position
local cameraPosition = playerPosition + offset
camera.CoordinateFrame = CFrame.new(cameraPosition, playerPosition)
end
runService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)

1 comment
Oops, I didn't seem to specify enough, I mean I want them to be able to only move their camera on the X axis and not the Y axis and also be able to zoom in and out.