- Describe the bug. Describe what is happening when the bug occurs. Describe what you would normally expect to occur.
When binding a PlayerActions
-value to a function using ContextActionService
it will by default pass the event through to lower-priority bound handlers. According to the documentation, not returning anything specific will result in the event being sank (which is expected). Explicitly returning Sink
works for some reason, though.
- How often does the bug happen (Everytime/sometimes/rarely)? What are the steps that reproduce the bug? Please list them in very high detail. Provide simple example places that exhibit the bug and provide description of what you believe should be the behavior.
Happens always. Put this in a LocalScript:
local function testFunc(actionName, state, iO)
print('fired', actionName, state)
return Enum.ContextActionResult.Sink
end
game.ContextActionService:BindActionAtPriority('bound-to-q-1000', testFunc, false, 1000, Enum.KeyCode.Q)
game.ContextActionService:BindActionAtPriority('bound-to-q-10000', testFunc, false, 10000, Enum.KeyCode.Q)
game.ContextActionService:BindActionAtPriority('bound-to-forward-1000', testFunc, false, 1000, Enum.PlayerActions.CharacterForward)
game.ContextActionService:BindActionAtPriority('bound-to-forward-10000', testFunc, false, 10000, Enum.PlayerActions.CharacterForward)
If you comment out the return
-line, you will notice that the bound-to-forward
event will pass on to the lower-priority one, unlike bound-to-q
(the latter one behaves just like the documentation specifies).
- Where does the bug happen (www, gametest, etc) Is it level-specific? Is it game specific? Please post a link to the place that exhibits the issue.
Current live version
- Would a screenshot or video help describe it to someone? If so, post one.
n/a
- For graphics bugs, it is sometimes helpful to know your system specs, especially graphics card.
n/a
- When did the bug start happening? If we can tie it to a specific release that helps us figure out what we broke.
No clue, stumbled upon this awkward behavior today.
- Anything else that you would want to know about the bug if it were your job to find and fix it.
n/a