BindActionToInputType, invokeCallBack failed?
So I've made a little piece of code to toggle between equipping and unequipping a sword. it's in a local script, and anything mentioned is already defined.
01 | local swordReady = true |
03 | function ToggleEquipSword() |
04 | if not swordReady then return end |
10 | print ( 'Unequip sword' ) |
17 | contextAction:BindActionToInputTypes( 'ToggleEquip' ,ToggleEquipSword, false ,Enum.KeyCode.One) |
So, things work fine. The output still has prints when I press 1 on my keyboard. However, it also says:
- ContextActionService::InvokeCallback failed because Callbacks cannot yield
I don't know what this means and I don't know if it will interfere with later parts of the script.