Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Which one should i use ContextActionService or UserInputService?

Asked by 7 years ago

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

Log in to vote
1
Answered by 7 years ago

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.

2
Ok thanks! cornman601 59 — 7y
2
No problem, happy scripting :) DepressionSensei 315 — 7y
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 Happywalker 185 — 7y
Ad

Answer this question