You can use mouse.move to connect to a function like so:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Move:Connect(function()
print("Mouse Moved")
end)
But if the player is in first-person then the event wont print.
I’ve looked for solutions but the only thing i could find would be how to make the mouse move in first-person but i want it to stay in the center.
Any fix or alternatives.
Thanks in advance
You can use the InputChanged event of UserInputService to detect mouse movement.
local UserInputService = game:GetService("UserInputService")
UserInputService.InputChanged:Connect(function(input, gpe)
if input.UserInputType == Enum.UserInputType.MouseMovement then
print("Mouse moved")
end
end)