How to detect mouse movement?

I know you’re probably thinking that there’s already many topics exactly like this one, but instead of detecting mouse coordinates, I need to detect mouse movement in all directions.
I’m making a first person game, and I’m making a custom scriptable camera.

2 Likes

The mouse object has a move function you can use

Local Script:

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local mouse = player:GetMouse()

mouse.Move:Connect(function()
    print("Mouse moved")
end)
4 Likes

I know there is a Mouse.Move(d?) event that occurs whenever the mouse moves.
And there’s this:
https://developer.roblox.com/en-us/api-reference/function/UserInputService/GetMouseDelta

Which I’m not familiar with, but I’ve seen used before for a 3rd person camera.

2 Likes

I need to detect it, as in up, down, left, or right.

In that case, I think you could look at this solved post.

3 Likes