How can i make context action service not respect / ignore UI buttons

I’m trying to have context action service events binded to mouse button 1 but whenever i click or release the mouse button while hovering over any UI button element it doesn’t fire the binded function.

Unfortunately, I don’t think there’s a workaround for that (specifically for GuiButton presses) while still using the ContextActionService.

Someone created a thread with the same question for a similar situation somewhat recently and I ran some tests to try to find a solution for it with no success. It didn’t seem like there was any way to have it call the bound function, unless that button was created for that action through the “createTouchButton” parameter of the :BindAction() call.


Until there is a better solution found / something changed with the ContextActionService to be compatible with calling a bound function in that situation, it seems like the next best option would be to utilize the UserInputService for that specific use case, while continuing to use ContextActionService in other situations that wouldn’t have the possibility of being “overridden” by GuiButton-related input.


Reference:

Thanks for the explanation, i think I’m just going to make a custom handler for UI buttons instead. That would be less complicated in my case.

1 Like

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