How to make debounce on jump that works on mobile as well

I have tried multiple ways to make a debounce on jumping but on mobile it does not work since the button disappears when disabling jump and changing jump power to 0. Any help would be greatly appreciated since I can not figure it out.

-- Services
local userInputService = game:GetService("UserInputService")
local players = game:GetService("Players")

-- Local player
local player = players.LocalPlayer
local character = player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

-- Fires when the user tries to jump
local debounce = false
local function Jump()
	if debounce == true then
		delay(.375,function()
			debounce = false
		end)
		print("Notable")
		humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
	elseif debounce == false then
		debounce = true
		print("Able")
		humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
	end
end
local function Jump()
	if debounce == false then
		humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
		debounce = true
	end
	wait(.375)
	debounce = false
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
end

userInputService.JumpRequest:Connect(Jump)

The wiki has what you’re looking for ill leave a link for you below. For future reference though instead of attempting to check for humanoid related things using when keys/buttons were pressed its best to just directly check the humanoid states.

Humanoid.StateChanged (roblox.com)

1 Like

Do you believe there is any way just using jump request?

How would I implement state changed with debounce on jump?