Humanoid.Jumping or Humanoid:GetPropertyChangedSignal

which code would be faster/more reliable to use to detect when a Humanoid jumps

Minor question, but I’m confused on which is better to use

Examples of both

local Character = script.Parent
local Humanoid = Character.Humanoid

local StartTime = tick()

Humanoid.Jumping:Connect(function(Bool)
print("Jumping " .. tostring(Bool) .. " " .. tick() - StartTime)

end)

Humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
print("PCS " .. " " .. tick() - StartTime)
end)

image

GetPropertyChangedSignal() is slightly faster than Jumping() (0.02252244949 seconds) but it’s also fired twice as much

I’m thinking Jumping() is better due to the speed increase being very minor is this true?

Your example isn’t very realistic as you wouldn’t normally be connecting to a “jumping event” using .Jumping and then using :GetPropertyChangedSignal("Jump") in the same script.

I’ve decided to run them in separate scripts to give a more realistic example and .Jumping is actually faster based on the data.

Data:

  Jumping true 1.2319679260254
  PCS  1.2447497844696
  PCS  1.2462270259857
  Jumping false 1.2468297481537
  PCS  1.2617740631104
  PCS  1.345032453537

Hopefully this answers your question, as I believe .Jumping is a better option, plus it’s the recommended option on the wiki and I personally will trust the wiki.

Edit: I did edit the data as I was providing an inaccurate example myself as I was using server scripts rather than local scripts, the data above is now accurate though. I’ve also decided to provide my .rbxl below:
JumpingExample.rbxl (15.0 KB)

5 Likes