So I've got this scope script bound to "q" and whenever I scope in and then out, I'm back to Third-Person. Any way to avoid this?
Tool = script.Parent
Player = game.Players.LocalPlayer
Cam = game.Workspace.CurrentCamera
Tool.Unequipped:connect(function()
Cam.FieldOfView = 80
Player.CameraMode = "Classic"
if Player.PlayerGui:FindFirstChild("Scope") ~= nil then
Player.PlayerGui.Scope:Destroy()
end
end)
zoomed = false
function ZOOM(key)
if key then
key = string.lower(key)
if (key=="q") and not zoomed then
zoomed = true
Cam.FieldOfView = 20
Player.CameraMode = "LockFirstPerson"
if Player.PlayerGui:FindFirstChild("Scope") == nil then
script.Parent.Scope:Clone().Parent = Player.PlayerGui
end
elseif key == "q" and zoomed then
zoomed = false
Cam.FieldOfView = 80
Player.CameraMode = "Classic"
if Player.PlayerGui:FindFirstChild("Scope") ~= nil then
Player.PlayerGui.Scope:Destroy()
end
end
end
end
Tool.Equipped:connect(function(mouse)
mouse.KeyDown:connect(ZOOM)
end)

2 comments
Have you tried doing 'Player.CameraMode = 0' or 'Player.CameraMode = 1'? Because I've noticed just doing 'Player.CameraMode = "LockFirstPerson" is a bit buggy. [0 = Classic, 1 = LockFirstPerson]
Same effect. After pressing "q" to unzoom, it still brings me back to third person.