Detecting Mouse wheel scrolls on Buttons

As the title says, I am currently not able to get any event fires from WheelForward:Connect() and WheelBackward:Connect(), whilst the cursor is on a TextButton GUI. Are you just not able to get the fires or ?

1 Like

Have you tried using the UserInputService.InputChanged event instead?

if input.UserInputType == Enum.UserInputType.MouseWheel then
	--do code
end
2 Likes

This worked; however I’m not able to tell if it’s scrolling forward or backward. I did figure out that

GuiObject.MouseWheelForward

, and

GuiObject.MouseWheelBackward

are a thing, and that seemed to be the solution, therefore it was my own mistake, though your answer seems to be correct for this particular question.

print(input.Position.Z) --1 is up, -1 is down.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.