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

How do I change a character's FOV?

I can't script, but I'm trying to find a setting that allows me to change a character's FOV in my game. All of the sources I've found so far are outdated.

1 comment

1

Then you should be chacking the wiki

2 answers

✓ Accepted answer

#####Please accept hit "accept answer" if this helped

##Question

How do I change a character's FOV?

##Answer You can get the client's camera from a LocalScript. The CurrentCamera index in https://developer.roblox.com/api-reference/class/Workspace return's the client's camera.

Simply set the FieldOfView property on the camera to a desired FOV. (Note the FOV can only be set to range [1, 120] and it is default 70)

###Example code

local players = game:GetService("Players")

local client = players.LocalPlayer
local camera = workspace.CurrentCamera --// get camera

camera.FieldOfView = 100 --// set FoV to 100

8 comments

0

What do I put the script in? Workspace?

0

Learn to read

1

why so toxic? damn.

0

You put the local script anywhere replicated to the client (and where scripts run) such as ReplicatedFirst StarterPlayerScripts StarterCharacterScripts and Backpack

0

Thanks.

0

Also "StarterGui

1

^^ @Sinister Also "StarterGui" is a valid choice

0

I didn't mention everything but thanks for noting that!

use the CurrentCamera property from workspace on the client, which is the player's camera. then change the FieldOfView property of it; article.

ex

--client

local camera = workspace.CurrentCamera

camera.FieldOfView = 50 -- default is 70 degrees

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