How to Detect when a player jumps?
Check out Humanoid state type.
https://developer.roblox.com/en-us/api-reference/property/Humanoid/Jump
You can check if the humanoid’s state is changed. then check if that value is “Jump.”
um it only tells you if the player is currently jumping or not. But I need to make it so it detects when a player jumps. So say the player jumps and then a function will run. Actually i need to make a superjump power. It makes you can jump high. Everytime you jump when you use it it works once and after you had the high jump it will be gone. please help
i think it is but will it fire if the player is currently in the air, or dead, etc. because i don’t want their superjump powers to be used when they tried to jump when they are dead ;-;
You can simply check the state of the Player’s Humanoid, FloorMaterial and Humanoid Health for that.
um no not really i want a kind of “event” when the player jumps successfully
I have found another way to do this (i guess), You can use Humanoid.Jumping, Then check if the Player is Jumping or not (Via the Parameter passed through the function) and then just check all the other stuff. (FloorMaterial, State, Health, etc)
local Player = game.Players.LocalPlayer
local Humanoid = Player.Character:FindFirstChild("Humanoid")
Humanoid:GetPropertyChangedSignal("Jump"):Connect(function(changed)
if changed and Humanoid.Jump == true then
print(Player.Name.." is jumping!")
end)
end
That should work!
Few ways to do this
Humanoid.Jumping:Connect(function(IsJumping) --Best way to do this
if IsJumping then
else
end
end)
Humanoid:GetPropertyChangedSignal("Jump"):Connect(function()--Works, but why?
if Humanoid.Jump == true then
else
end
end)
UserInputService.JumpRequest:Connect(function()--If you want to do airjump and stuff this is the way
end)
Nice Works realllywell exceptt that the first works slower to connect but the other two work faster so yea?
Update i am back i realized some work better in locals and others work better is server but it also depend on the lag in both.