Problem
So I’ve seen these sprints with this FOV effect, and wanted to the same for the players camera, but have no idea how it works, so I searched on Youtube in attempt to find my answers but was unfortunate enough to not find a solution.
So that’s why I’m turning to you guys to help find how I do this
local cam = game.Workspace.Camera
local plr = game.Players.LocalPlayer
local char = plr.Character
local UserInt = game:GetService("UserInputService")
UserInt.InputBegan:Connect(function(input, gameProcessed, IsTyping)
if IsTyping then return end
if input.KeyCode == Enum.KeyCode.LeftShift then
cam.FieldOfView = 120
char.Humanoid.WalkSpeed = 32
end
end)
UserInt.InputEnded:Connect(function(input, gameProcessed, IsTyping)
if IsTyping then return end
if input.KeyCode == Enum.KeyCode.LeftShift then
cam.FieldOfView = 70
char.Humanoid.WalkSpeed = 16
end
end)
--place it on StarterCharacterScripts.
--By ClanShad27