ContextActionService/GUI Hold Button, possible?

Take this for an example, hold Left Shift to run. Seems easy with UserInputService right? Well this only works on all devices except touch-screens AKA mobile devices. Is there a possible way to make a button that allows mobile player to hold the button and make them sprint and make them stop sprinting when they release their finger?

2 Likes

Yes, there is, this is definitely possible, but I do not know how to do that.

Yes, you can look at the InputBegan and InputEnded events of a GUI Object or button. On InputBegan, make the character run, and on InputEnded, return to the normal WalkSpeed.

3 Likes

I assume this also works with ContextActionService’s mobile button creation, right?

Yup I don’t see why it wouldn’t