Hi guys,
do you know how can I detect mouse move and still have it locked in the middle? I have a script that makes it centered but I can’t detect mouse moves
[MOUSE MUST BE CENTERED]
What have you tried? UserInputService will tell you when the mouse moves via UserInputService.InputChanged
As @gertkeno said, you can use UserInputService
or ContextActionService
:
local function mouseMoved(actionName, inputState, inputObject)
print(inputObject.Delta) -- Prints the mouse's change in position
end
game:GetService("ContextActionService"):BindAction("MouseMoved", mouseMoved, false, Enum.UserInputType.MouseMovement)
1 Like
Tank you! That’s all I wanted!