Questions about rebinds

Hey, and thanks for reading in advance.

In a class-based fighter I’m helping to code, we provide players with the option to rebind various actions to whichever keys/controller buttons they so choose. However, I understand that some integral actions are already bound to both the keyboard and the controller (Jump on spacebar/A, Menu on ESC/Start, and Select allows the user to navigate GUIs with their controller).

My question is - do I need to code in any protective behavior to stop people from binding actions over inputs already dedicated to core mechanics, or does roblox prevent this automatically? If so, which buttons are ‘protected’ from overwrite and which are not?

Secondly, if I listen for input in two different scripts, do inputs sink to both connections or is there a caste-system of sorts for which connection gets priority?

Any help is appreciated.

Roblox does not automatically block input from keys binded by default. For example, if you have a GUI that opens and closes when you press the spacebar, that gui will open and you will still jump.

As far as I am aware, correct me if I am wrong, but there is not currently anyway to rebind the default roblox Keybinds.

ContextActionService does block default roblox actions that were bind using the service as far as I know, but it doesn’t block all of them

1 Like