I’m trying to utilize the MouseWheel for one of my projects and it appears that I’m either doing it wrong, it’s being overridden by something hidden or it doesn’t work as intended entirely.
-- In a localscript under StarterPlayerScripts
local userInputService = game:GetService("UserInputService")
userInputService.InputBegan:Connect(function(input,gameProcessed)
if input.UserInputType == Enum.UserInputType.MouseWheel then
print("mouse wheel")
end
end)
I appreciate any responses. Absolutely dumbfounded by this predicament.
Is there any reason as to why my code doesn’t work? It’s quite strange that there’s an enum for it but, it doesn’t fire. While the code you wrote works, I rather have mine binded under UserInputService.InputBegan for the sake of cleanliness.
Well, I found out that the mouse wheel doesn’t actually register at all in UserInputService. For clarification, if you were to have a print command after the UserInputService function, and you scrolled your mouse, there would be no output at all(maybe I’m wrong)