ContextActionService blocks default Roblox inputs, what to do now?

I’m making an input handler that uses the ContextActionService to handles keybinds etc.

When binding the mousebutton2, the player can’t use their mouse anymore to look around and shift lock is the only option. I think this happens because for some reason a single input can only be binded to one action at a time, which I think is stupid… More stupid is that it unbinds default Roblox actions without skipping a beat.

There’s no solutions on the forum as far as I know.
One thing I could obviously do is revert to using the UserInputService, but that just seems so dumb when the ContextActionService is newer and supposed to be better. Also that would bring back the problem of mobile support :confused:

--[[
this blocks the player from using a mouse to look around
I do not even care about knowing when the players mouseButton2 is down,
I just want to bind an action to when they press it or unpress it.
]]
cas:BindAction(actionName, actions[actionName], false, Enum.UserInputType.MouseButton2)

If you know a solution, lemme know :wink:

if you do not return a ContextActionResult, it will default to sinking any actions below it.

To fix your issue, you need to return Enum.ContextActionResult.Pass.

Thx a lot, I watched multiple videos about CAS and they didn’t explain this.

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