ContextActionService vs UserInputService

This will be a short post, but I was just wondering, should I use ContextActionService, or UserInputService? The Developer Hub suggest to use ContextActionService, but if it was better than UIS, then UIS wouldn’t be here. So in the end, what do you prefer? Please explain why, I really need to understand what is better.

They have different purposes. UserInputService is more of a lower-level ContextActionService (in terms of abstraction) which is usually more robust. ContextActionService, as its name implies, is used to react to inputs depending on the context of the action. For example, pressing E to open a nearby door.

So neither is better than the other objectively, they have different purposes.

4 Likes

Please, please use ContextActionService.
It’s like the UserInputService but allows for easy mobile support, adding buttons to appear on their screen. Devs who use UserInputService often leave mobile in the dark for no good reason, please use ContextActionService.

4 Likes

If the input system is very organized, adding mobile is easy even if the dev is using UserInputService.

2 Likes

Yes, but my point is that people don’t do this, and can do it easily with ContextActionService.

Isn’t ContextActionService individualizing inputs? Just Like PlayerAdded vs local player.

So wouldn’t UserInputService be much more system performant since you can combine lots of input in one connection?

Unless if you want to disconnect the input afterwords with:UnbindToAction() or use it for mobile buttons, I don’t see any performant gains with ContextActionService.

Contextaction service is how u make those buttons for mobile users so lets say u have a shift to sprint u can u use the context action service to make a button for mobile users where once u clcik it makes the player run.