Hello,
I have a question regarding the ContextActionService. When using BindAction
to bind a function for a player, does it only bind the action for that specific player, or does it affect all players?
Scenario:
Let’s say I use ContextActionService:BindAction
to bind a function with a specific string name for one player. If another player also binds an action with the same string name, and then I call UnbindAction
, will it only unbind the action for that player or for all players since they share the same action name?
Here’s a script example:
function bindEquip(onEquipFunction, keycode)
local heldGun = false
local function onEquip()
services.ContextActionService:BindAction("equip", onEquipFunction, false, keycode)
end
local function onUnquip()
services.ContextActionService:UnbindAction("equip", onEquipFunction, false, keycode)
end
end
return module