Change the Player's FOV as the tool is activated

I want to Change the Player’s FOV as the tool is activated.
Here is my local script:

But it is for some reason not working as I click and keep clicking
the “Scoped” which is a boolean value inside my model to show if the weapon is scoped or not.
I need a little explanation on why it is not working.

Ok, it’s late at night for me and I could be wrong, but I think it has to do with server/local scripts. If you are trying to change the bool value through the local script there should be a problem.

Does it at least print anything? If not, then event wasn’t made, the only thing it could be is if it couldn’t find a child called “Scoped”/you gave it the wrong place to check for Scoped.

If it does print, maybe you need to use workspace.CurrentCamera instead of game.Workspace.Camera?


oh the reason for this is because you haven’t made the cameraType to ScriptAble
To make the work just rework the camera variable:
local camera = game.workspace.CurrentCamera

and type this below it
camera.CameraType = Enum.CameraType.Scriptable

put this in local script

local plr = game.Players.LocalPlayer
local Tool = plr.Backpack:WaitForChild("Deagle")
	cam.FieldOfView += 10
	cam.FieldOfView -= 10
local camera = game:GetService("Workspace").CurrentCamera

Oh, and why not just check if it’s scoped in while equipped? It won’t really make a difference.