game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
humanoid.Jumping:Connect(function()
-- Your Code Here
end)
end
end)
end)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
humanoid.Jumping:Connect(function()
player.leaderstats.LEADERSTATNAME.Value += 1
end)
end
end)
end)
Sometimes it would not detect humanoid is jumping.
If that happenes to you, try this:
Jumping = false
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid")
if humanoid then
humanoid.Changed:Connect(function()
if humanoid.Jump and not Jumping then
Jumping = true
player.leaderstats.LEADERSTATNAME.Value += 1
end
end)
humanoid.FreeFalling:Connect(function()
if Jumping then
Jumping = false
end
end)
end
end)
end)