I'm making a third person shooter and have it so that when the player aims by pressing RMB, the perspective switches to first person. I achieve this by doing:
UserInputService.InputBegan:Connect(function (input, gameHandledEvent)
if gameHandledEvent or not ExpectingInput then
return
end
if input.UserInputType == Enum.UserInputType.MouseButton2 and Mouse ~= nil then
Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
end
end)
UserInputService.InputEnded:Connect(function (input, gameHandledEvent)
if gameHandledEvent or not ExpectingInput then
return
end
if input.UserInputType == Enum.UserInputType.MouseButton2 and Mouse ~= nil then
Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic
end)
While the player is zoomed in, they can still zoom out by using the mouse wheel. How do I fix this?

1 comment
You could try to change the player's maxzoom? That might be a solution.