Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to change field of view in this code?

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

✓ Accepted answer

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 comment

1

Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.