Why is this Jumping Counter leaderboard script unresponsive?

I had some help with a jump counter leaderboard.
but its unresponsive.

Here’s the script:

game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player 

    local jumpCount = Instance.new("IntValue")
    jumpCount.Name = "Jumps"
    jumpCount.Parent = leaderstats

    player.CharacterAdded:Connect(function(character)
        local humanoid = character:WaitForChild("Humanoid")
        humanoid.StateChanged:Connect(function(oldState, newState)
            if newState == Enum.HumanoidStateType.Jumping then
                jumpCount.Value = jumpCount.Value + 1
            end
        end)
    end)
end)
1 Like

At a glance is looks correct, I’ve never used StateChanged though.

Try putting some print statements on some of the lines and see if there’s console output.