I’ve used both User Input Service, and Context Action Service. They both seem to do the same thing, just in different ways. I saw that you could bind and unbind with CAS, which i guess could help stop memory leaks? I also saw with UIS that you can check when the input is started and ended, which to my knowledge is not possible with CAS.
Which is better to use, or does it depend on context? I personally find CAS a bit more organised, but I’ve not used either very much. What are more of some of the differences?
(I also like with CAS i dont have to check what the input is, i can just define it when its binded.
When this came out, the announcement said ContextAction is deprecated and is planned to be discontinued but UserInputService will still be supported.
Step 1: Add “InputContet” object into somewhere the client can access (ex. StarterGui, StarterCharacter). This can be enabled or disabled (ex. attack input is disabled for intermission).
Step2: Add “InputAction” into InputContext and name it what you want. (ex. PunchInput)
Step3: Add “InputBinding” into InputAction and set the KeyCode (ex. E). You can add multiple InputBindings for other inputs and its the same for controller/touchscreen gui)