Making an FOV changer but with problems

First of all, I’m making an FPS changer for a setting and it’s a FPS game

The problem is scoping/ironsights
Scoping/ironsights makes it so that when a player changes to like 120 fov and they scope (50 FOV), and get out of scope, their FOV is reset to 70.

Any way to make it so the scope changes back to it’s original or detect if the FOV is 70?

You could probably just save the FOV to a variable every time you change it, then reset it to that saved value when you reset it
For example:

local originalFOV = 70

function scopeIn()
    originalFOV = Camera.FieldOfView
    --do stuff
end

function scopeOut()
    Camera.FieldOfView = originalFOV
end
2 Likes

I could probably change “70” to game.Workspace.Value