Mobile | Jump Button Dispearing after clicked once

Hey,
I’ve just noticed that my game doesn’t work well on mobile.
The problem is that I’m unable to jump after jumping once.
I don’t have any scripts messing with the JumpButton.
Any solutions?

1 Like

Make sure the CharacterUseJumpPower and CharacterJumpHeight are true and > 0 in the StarterPlayer properties. As well as for the UseJumpPower and JumpHeight in the character’s Humanoid properties

1 Like

Either i can only use CharacterUseJumpPower or CharacterJumpHeight i cant enable both at the same time as i know.

do you have any scripts that detect jumping or that set the jumpheight?

I just have a custom movement script but all it does for jump is track if the player is jumping for a cooldown using:

Humanoid.Jumping:Connect

Here is your issue. You’re disabling the jump in some way to prevent the character from jumping until the cooldown is finished.

The mobile jump button disappears when the jump is disabled (set to false or 0 for one of the values I mentioned in my first reply). However, the button does not reappear when you re-enable the jump, so you need to do it manually by accessing the TouchGui inside the PlayerGui.

local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")

-- When the jump cooldown finish
local TouchGui = PlayerGui:FindFirstChild("TouchGui")
local JumpButton = TouchGui and TouchGui:FindFirstChild("JumpButton", true)

if JumpButton then
    JumpButton.Visible = true
end
2 Likes

adding to this, what I personally do -so that it’s not set to 0- is set it to a really small number. The Mobile jump button persists as it’s coded internally to disappear only at 0.

humanoid.JumpPower = 0.000000001
2 Likes

Thanks, that helped and fixed my problem.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.