ControlModule bug: :Disable() does not disable jump button

As a vehicle developer, I want to give mobile players native controls to control vehicles with. This means a custom GUI to control steering and throttle. I want to place the steering on the left and throttle on the right.

There is a handy function in ControlModule called :Disable(). With this function, developers can remove the existing control GUI and supplant it with our own. This feature is perfect for the application, as I can disable the default GUI while the player is driving and re-enable it when they get out of the vehicle.

Unfortunately, :Disable() does not affect TouchJump:EnableButton(). This means that even though I want both thumbstick and jump button to disappear, the jump button stays stubbornly on the screen.

Since TouchJump does not return a new()'d version of itself like ControlModule, disabling the button is not as simple as requiring the module and calling :EnableButton(false).

Expected: a simple way to disable touch jump button (e.g. ControlModule:Disable())

Observed: no simple way to disable touch jump button

2 Likes

This bug is still happening to this day. Currently the only solutions are to fork the module then copy/paste lines 499-501 in between lines 471 and 472, set Humanoid.JumpPower to zero, or disable the Jumping state on the humanoid.

The last two of those solutions prevent jumping, and the other one disables updates to the whole player module. The first solution really should be implemented on Roblox’s end.