ContextActionSerivce or UserInputSerivce

What’s the difference between ContextActionService and UserInputService, they seem like they do the same thing, and I always use UserInputService. I just want to know the difference.

1 Like

context action service is better in most cases because it lets you bind / unbind actions
and have multiple inputs that will execute the same function like (E on pc / X on console / click gui on mobile / etc )

ContextActionService | Documentation - Roblox Creator Hub

if you want to know how to use it easily search it up on youtube

and this is the wrong category it should be scripting support

1 Like

ContextActionService offers the ability to create inputs way quicker and easier compared to UserInputService while ALSO providing you with a priority system (basically if two inputs are bound on the same key, only the input with the higher priority will fire).

UserInputService on the otherhand offers you other general input related systems along with letting you create and manage your own alternatives for ContextActionService.

For short, ContextActionService works for quick and simple stuff while UserInputService works for more complex things. (or it works if you need custom alternatives to ContextActionService)

1 Like

ContextActionService works better for actions that are done within a context (duh), for example; Standing up from a chair, reloading a weapon, or throwing a ball

UserInputService works better for actions that are constantly enabled, for example; Opening a Leaderboard Gui, Making a character crouch, or performing an emote

1 Like

So ContextActionService is basically better in most cases?

1 Like

Mostly yeah. If your game only really needs simple input handling then ContextActionService should be more than enough.

1 Like

I just realised, its only local, why isn’t it on the server side as well?

1 Like

These services detect user inputs, hence the name “UserInputService” (ContextActionService too)

On the server, what would there be to detect?

1 Like

The server itself is designed to manage ALL game players and systems. You can’t exactly do that on the server without bloating everything along the way for functionality that would not make sense in most cases.

If you need some sort of input to fire on the server, what you could do is just fire a remote from the client to the server once the input has been fired.

1 Like

Good answer, Thank you very much!

2 Likes