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

How to change field of view in this code?

Asked by 4 years ago
repeat wait() until game.Players.LocalPlayer
local Mouse = game.Players.LocalPlayer:GetMouse()
local Plr = game.Players.LocalPlayer

Mouse.KeyDown:connect(function(KeyDown)
if KeyDown == "0" then
Plr.Character.Humanoid.WalkSpeed = 190
end
end)

Mouse.KeyUp:connect(function(KeyUp)
if KeyUp == "0" then
Plr.Character.Humanoid.WalkSpeed = 16
end
end)

I need to change the field of view

1 answer

Log in to vote
0
Answered by
D3VRO 66
4 years ago

Just add a variable defining the camera in Workspace. And in the code where you want to change the FOV, just use the camera property.

Ex:

local Cam = game.Workspace.Camera
Cam.FieldOfView = 50
1
Thanks TheInternetMemer 40 — 4y
Ad

Answer this question