Middle Mouse Button Input not Working

For some reason when trying to use UserInputType.MouseButton3 it wont work.

I’ve read through my script multiple times and when replacing UserInputType.MouseMovement it prints “test”.

Script:

local UserInputService = game:GetService("UserInputService")

UserInputService.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton3 then
		print("test")
    end
end)

Any help would be greatly appreciated. Thanks for reading.

From my understanding, MouseButton3 can only start and end.

To that end, MouseButton3, like the other mouse button inputs, is a digital input. MouseWheel may help you, though, since that is an analog input.

3 Likes

Thanks, I didn’t realize that.