Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How To Lock My Field Of View?

Asked by 4 years ago
Edited 4 years ago

So I Been Scripting For Few Weeks And I Want To Lock My Field Of View Heres My Script


local offset = Vector3.new(-5,50,0) local fieldOfView = 90 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 answer

Log in to vote
0
Answered by 4 years ago

try this:

while true do
    camera.FieldOfView = fieldOfView
end
Ad

Answer this question