Yeah, detecting jumping on Roblox is notoriously painful and buggy…
Seems to be working fine for me though?
My code used is (in StarterCharacterScripts)
local localCharacter = script.Parent
local localHumanoid = localCharacter:WaitForChild("Humanoid")
local function onHumanoidJumping(isJumping)
print(isJumping)
end
localHumanoid["Jumping"]:Connect(onHumanoidJumping)
Well, you could try using HumanoidStateType and connect Jumping state, although it happens briefly, if you don’t want to check for how long player is actually jumping then that should fix the issue.
local localCharacter = script.Parent
local localHumanoid = localCharacter:WaitForChild("Humanoid")
local function onHumanoidStateChanged(currentState)
local isJumping = currentState == Enum.HumanoidStateType.Jumping
if isJumping then
print("Player is jumping.")
end
end
localHumanoid["StateChanged"]:Connect(onHumanoidStateChanged)
local char = script.Parent
local hum = char:WaitForChild("Humanoid")
hum.StateChanged:Connect(function(oldState, newState)
if newState == Enum.HumanoidStateType.Jumping then
print("jump")
end
end)
it’s because of the server-client boundary and ping or internet delay. when you jump, your roblox client actually “uses a RemoteEvent” (not actually a RemoteEvent, the server automatically replicates a player’s character in the client) to send your current position to the server. when firing a RemoteEvent from client to server and vice versa, there is a delay because of internet delay. this is also the reason why the perspective of a player walking in their device is different from another player’s perspective in a different device; when you start walking in your computer, you see that in another computer, there is a delay before you actually started walking. this is called replication
you can read more about replication and server-client boundary here