I’m trying to make a sprint script that works on mobile and the script uses Context Action Service but i want to use the pre-made button, is there a way to do this?
1 Like
ContextActionService doesn’t support this natively so you will have to do some legwork yourself. Consider divorcing the sprinting function from context bindings and make it an independent function. This way you can have your existing button as well as your context binding both only update the player’s sprinting state when called and then adjust the player’s speed accordingly.
In other words: the context binding should set if the player is sprinting based on if the input is beginning or ending and the button should set the sprint state to the inverse of the current state. Then an independent process can determine the player’s sprinting speed according to this set state.