ContextActionService or UserInputService

Which one should I use for my input listener, or for my custom movement module.

ContextActionService

1 Like

Use UserInputService, Its Better.

You should use UserInputService for sure.

ContextActionService is far superior, but what UserInputService has going for it is simplicity

1 Like

Comment section is split, still don’t know which one should I use & why.

ContextActionService is a lot better but it’s quite odd to use. You kind of have to know its qwerks like ignoring the Changed inputState (because for some reason it will fire the Changed input state for random stuff?)
It also has the priority system, which allows you to overwrite roblox actions, or other actions you binded.

If you do not need those features from ContextActionService, UserInputService is a lot nicer to use and works very well. Unlike ContextActionService, UserInputService is activated for any keybind (for .InputBegan) which can be a downside or a benefit, depending on the context.

I usually use a mix of ContextActionService and UserInputService

The experts are divided. You should use UserInputService because it’s simpler and very useful most of the time. However, sometimes that doesn’t cut it, which is when you need CAS, which is explained here: What's the difference between ContextActionService and UserInputService? - #2 by 6Clu

1 Like

Hello Liminal,
Both has its use cases and it would depend on the situation on when you should use what.
ContextActionService is a great way to create buttons, make keybind, and controller or mobile support.
UserInputService can still do all these things but you just gotta do a tiny bit more. Like for buttons you can just create it yourself and for keybind you just gotta add checks for each key.

You could also check out this input action library thats pretty easy to use: Getting Started | spark

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.