I’m puzzled by this behavior. I was trying to test what would happen in the case where there are multiple actions bound with the same name. To check if the most recently bound action would override the previous one. While performing this test, I noticed that the functions bound to the actions get called for no apparent reason.
local ContextActionService = game:GetService("ContextActionService")
local key = Enum.KeyCode.H
task.wait(5)
function handler(ActionName, InputState,InputObject: InputObject)
print("run", ActionName,InputState,InputObject.KeyCode)
end
ContextActionService:BindAction("DuplicateKey", handler, false, key)
ContextActionService:BindAction("DuplicateKey", handler, false, key)
print"connected"
task.wait(5)
ContextActionService:UnbindAction("DuplicateKey")
print"disconnected"
![]()
This seems like a bug to me unless I’m missing something…

