Humanoid.Jumping event not working properly

This has been happening for quite a while now.

  • I run a script which connects a function to the jump event that prints something whenever the humanoid jumps. The event for that is humanoid.Jumping.

You can try recreating the code yourself (it’s literally less than 10 lines), and you’ll notice when you hit play that the game doesn’t actually consistently register when the humanoid jumps. You can even stand still and then jump and there would be a high chance that the game didn’t register that.

Does this happen to anyone else? Is this a bug, or it it just me?

3 Likes

Are you checking this from the server or client?

1 Like

The code is running on a script stored in StarterCharacterScripts, so it’s running on the server.

1 Like

It is usually best to detect when a humanoid is jumping using a local script, which you can store in StarterCharacterScripts, and firing a remote event to the server when the humanoid is jumping if you want the server to process it.
From a local script, you have quite a few events for detecting when the humanoid is jumping:

-- you already use this, but for the sake of completeness
Humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
	-- fire remote here
end)

Source: UserInputService.JumpRequest

-- Make sure to use a debounce, since it fires every frame (I think)
UserInputService.JumpRequest:Connect(function()
	-- fire remote here
end)

Source: UserInputService.InputBegan

UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.Space then
		-- fire remote here
	end
end)

Source: ContextActionService:BindAction

ContextActionService:BindAction("DetectJump",function(name,state,input)
	if state == Enum.UserInputState.Begin then
		-- fire remote here
	end

	return Enum.ContextActionResult.Pass
end,false,Enum.PlayerActions.CharacterJump)
-- You can also use Enum.KeyCode.Space

Those are all the input options I know, if anybody knows any others, I will add it to this list.

7 Likes

Thanks for the reply! I’ll check these out tomorrow, I’m busy now

1 Like

This might work:

while wait() do
    if Humanoid.Jump == true then
        print("Jumping")
    end
end
1 Like

LocalScript it is!

Yeah checking for the event on the client side is much easier and is consistent.

1 Like

This also works (albeit not all the time):

Humanoid.Jumping:Connect(function(Bool_active)
--stuff
end)
1 Like