the script pretty much says it all, if you right click, either zoom in or out. it's not working for some reason
mouse.Button2Down:Connect(function() if aiming == false then aiming = true workspace.CurrentCamera.FieldOfView = 40 end if aiming == true then aiming = false workspace.CurrentCamera.FieldOfView = 70 end end)
Hello, wookey12!
your scipt was setting the variable 'aiming' to true, tests it and sets it to false, so you have to use a elseif!
Working script:
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local aiming = false mouse.Button2Down:Connect(function() if aiming == false then aiming = true game.Workspace.CurrentCamera.FieldOfView = 40 elseif aiming == true then aiming = false game.Workspace.CurrentCamera.FieldOfView = 70 end end)
Good Luck with your games!