I'm trying to obtain the x Delta of the mouse when the mouse is locked to the center of the screen, however, when using the following code the output is always 0.
According to the wiki, the delta value shouldn't be zero, even when the mouse is locked. I tried unlocking the mouse, and the delta still does not calculate.
Is there something I'm doing wrong here?
EDIT: Using inputObject.Position yields the correct position, so it is solely the Delta not working correctly.
local uis = game:GetService("UserInputService")
uis.MouseIconEnabled = false
uis.MouseBehavior = Enum.MouseBehavior.LockCenter
uis.InputChanged:connect(function(inputObject)
if inputObject.UserInputType == Enum.UserInputType.MouseMovement then
print(inputObject.Delta.x)
end
end)

1 comment
It was the starter control scripts