Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Which one should i use ContextActionService or UserInputService?

Which one should i use ContextActionService or UserInputService? I trying to make it when the player touches a part then he press RightShift which opens a gui. I already have the code in mind, but just cant figure out whats the different bewteen ContextActionService or UserInputService.

1 answer

✓ Accepted answer

When it comes to firing an action on a KeyPress, both are completely viable. However, I'd like to say that UserInputService is better when it comes to tracking user input, since it can check things like whether the player is holding a key down, what keys the player is currently holding, when the player changes their input, and when a player ends their input.

3 comments

2

Ok thanks!

2

No problem, happy scripting :)

0

ContextActionService can keep track of those things as well AND lets you easily organise your input (pc/gamepad/etc) without checking through all keys

This discussion is preserved as it was. New answers, comments, and votes are closed.