Player can zoom out even though camera mode is set to first person?
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:
01 | UserInputService.InputBegan:Connect( function (input, gameHandledEvent) |
02 | if gameHandledEvent or not ExpectingInput then |
06 | if input.UserInputType = = Enum.UserInputType.MouseButton 2 and Mouse ~ = nil then |
07 | Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson |
11 | UserInputService.InputEnded:Connect( function (input, gameHandledEvent) |
12 | if gameHandledEvent or not ExpectingInput then |
16 | if input.UserInputType = = Enum.UserInputType.MouseButton 2 and Mouse ~ = nil then |
17 | Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic |
While the player is zoomed in, they can still zoom out by using the mouse wheel. How do I fix this?