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?
Simply put the player's maxzoom to "0", u dont need any scripts, that's what I did for my game.