BindAction doesn't always override default action

ContextActionService:BindAction("Right", Right, false, Enum.KeyCode.Right, Enum.KeyCode.DPadRight)
ContextActionService:BindAction("AngleUp", AngleUp, false, Enum.KeyCode.Up, Enum.KeyCode.DPadUp)
ContextActionService:BindAction("AngleDown", AngleDown, false, Enum.KeyCode.Down, Enum.KeyCode.DPadDown)
ContextActionService:BindAction("Left", Left, false, Enum.KeyCode.Left, Enum.KeyCode.DPadLeft)
ContextActionService:BindAction("ChangeObject", changeObject, false, Enum.KeyCode.Y)
ContextActionService:BindAction("Fire", fire, false,Enum.KeyCode.Space, Enum.KeyCode.ButtonA)

For some reason the BindAction doesn’t always override the existing action. For example, if i press the up key my player will move forward and the action that I want to override that movement will also play. Interestingly, it doesn’t happen every time, so sometimes my player will still be able to move with the arrow keys and sometimes not. Also it only seems to happen with up, down, and space. I haven’t had the problem happen with left or right.

Maybe you can try using :BindActionAtPriority to ensure you override the default function of the arrow keys.

Ya I didn’t set it high enough. I did 100 but they need to be over 2000

1 Like