Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to have one key bound to multiple context action services?

Asked by
sydre 229 Moderation Voter
3 years ago

I have bound two actions to the left and right mouse button as shown below:

ContextActionService:BindAction("primaryAction", function(actionName, actionType) inventory:usePrimary(actionType) end, false, Enum.UserInputType.MouseButton1)
    ContextActionService:BindAction("secondaryAction", function(actionName, actionType) inventory:useSecondary(actionType) end, false, Enum.UserInputType.MouseButton2)

The issue is that this overwrites the keybinds for regular clicking and moving the camera. Is there any way to not do this? Ie, have multiple actions bound to a single input type.

0
Did you try using UserInputService.InputBegan ? That might be the only solution here Miniller 562 — 3y

Answer this question