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.
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
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)
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
So ContextActionService is basically better in most cases?
Mostly yeah. If your game only really needs simple input handling then ContextActionService should be more than enough.
I just realised, its only local, why isn’t it on the server side as well?
These services detect user inputs, hence the name “UserInputService” (ContextActionService too)
On the server, what would there be to detect?
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.
Good answer, Thank you very much!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.