Can't tell when player is holding down jump right

  1. What do you want to achieve?
    I am trying to make a bhopping system where everytime you jump you get more walkspeed.

  2. What is the issue?
    The issue is after I started using the Jump property in the Humanoid to tell when the player stops jumping, the script never gives me the walkspeed and now just prints that I am not holding the jump button.

  3. What solutions have you tried so far?
    None, as I don’t know what solutions to try.

This is the script that I am currently using. I just need to know how to give people walkspeed when they are holding down jump and landing on the ground (which I am doing now by telling when the landing sound is playing) and going back to the default walkspeed when they arent holding down jump and land on the ground again.

local Player = game:GetService('Players')
local Humanoid = Player.LocalPlayer.Character.Humanoid
local Character = Player.LocalPlayer.Character
local Jumping = Humanoid.Jump

Character.HumanoidRootPart.Landing.Changed:Connect(function()
	if Character.HumanoidRootPart.Landing.Playing and Jumping == true then
		print("landed")
		print(Humanoid.WalkSpeed)
		Humanoid.WalkSpeed = Humanoid.WalkSpeed + 10
	elseif Jumping == false then
		print("landed but stopped jumping")
		Humanoid.WalkSpeed = 16
	end
end)

I would recommend using the method UserInputService:IsKeyDown to check if the player is holding down space.

You can do this like so:

local UserInputService = game:GetService('UserInputService')

if UserInputService:IsKeyDown(Enum.KeyCode.Space) then -- Player is holding Space
    -- Run code if player is holding down Space
end

I hope this helps!