PC Info: Windows 10, 22H2
Impact: High
Frequency: Often, 1/4 of runs
Date First Experienced: 6/21/2023
Date Last Experienced: 07/04/2023
If you fire BindAction to 5+ keybinds, it will fire Cancelled for the last one
Reproduction Steps:
- Create a LocalScript parented to StarterCharacterScripts or StarterPlayerScripts (or download the placefile below)
- Add the below code and hit play and try multiple times.
local ContextActionService = game:GetService("ContextActionService")
local keybinds = {
Enum.KeyCode.Q,
Enum.KeyCode.F,
Enum.KeyCode.Y,
Enum.KeyCode.U,
Enum.KeyCode.Space,
}
for i, v in keybinds do
ContextActionService:BindAction(
i,
function(action, state, input)
print(action, state, input.KeyCode, input.UserInputType)
end,
false,
v
)
end
bug_contextactionservice.rbxl (46.2 KB)
Expected Behavior: Should bind the action to the keycode
Actual Behavior:
Furthermore, if you bind a duplicate keybind, it completely cancels 100% of the time. Though this could be intentional.