Help with MouseMovement on InputEnded

local UIS = game:GetService("UserInputService")

function inputEnded(input)
    if input.UserInputType == Enum.UserInputType.MouseMovement then
        RotateEnabled.Value = true
    end
end

UIS.InputEnded:Connect(inputEnded)

This fires when my mouse is outside of screen, not when i stop moving the mouse, any idea? That’s not entire script btw

input when you move the mouse is only detected through the InputChanged event, not InputEvent

to detect if the player stops moving their mouse, you could check the time passed since the last movement after a certain timing that you want

if you tell me what exactly youre trying to do i can try explain how to do it