No MouseDelta when zooming from first to third person [SOLVED]

I want the MouseDelta to continue to update when going from first person to third person while the right mouse button is held.

With the right mouse button held if you zoom from first person to third person the MouseDelta no longer updates when you zoom out to third person.

I have tried changing UserInputSerivce.MouseDeltaSensitivity and UIS.MouseBehaviour but niether of those fixed the issue.

The reason I am trying to get the MouseDelta is to update the rotation of the player for a gun.
video example

local UIS = game:GetService("UserInputService")
UIS.MouseDeltaSensitivity = 1
UIS.MouseBehaviour = Enum.MouseBehaviour.Default

GetMouseDelta requires the MouseBehaviour to be LockCenter or LockCurrentPosition to work. How are you getting the Delta? You haven’t provided your method.

If you would like scroll wheel delta you need to use UIS.InputChanged and check if the InputObject’s UserInputType is MouseWheel, then you can get the “delta” from InputObject.Position.Z.

UserInputService.InputChanged:Connect(function(input)
    if input.UserInputType == Enum.UserInputType.MouseWheel then
        print(input.Position.Z)
    end
end)
2 Likes
local mouse = player:GetMouse()
local mousePos = mouse.Position

I was using UserInputService:GetMouseDelta(), I never even thought to lock the mouse. Thanks, you have completely resolved the issue I was having.