You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to achieve to be able to catch the event when he mouse scrolls forwards and backwards by using an event in ContextActionService.
What is the issue? Include screenshots / videos if possible!
The issue is that I am trying to detect whether the wheel on the mouse is being scrolled, but Mouse.WheelForward or Mouse.WheelBack is quite basic, and if you were to open the chat menu and start scrolling, the event will still be caught in the code. I am looking for a scrolling wheel event in ContextActionService and I can’t find it.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
On Roblox Developer, it showed me the Mouse.WheelForward and Back events. It said for newer codes I should use something like ContextActionService but it did not tell me how to get the mousewheel in ContextActionService.
game:GetService("UserInputService").InputChanged:Connect(function(input, gameProcessed)
if gameProcessed then return end -- ignore chat window scrolling
if input.UserInputType == Enum.UserInputType.MouseWheel then
print("The mouse wheel has been scrolled!")
print("Wheel Movement:",input.Position.Z)
end
end)
thank you about that. But I have some more questions; How exactly would I check if the wheel is scrolled up or down, and also will this error if a player on different platform than computer is using this event?