I have a leader board set up and it works fine - I can see it when I test the game, yet I cannot find out how I would increase the stat for jumps made. Ex: I want the leader board to display how many jumps a player has made.
This is the current script: *note the commented part was just to make it easier to copy the code into different places
local function onPlayerJoin(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local jumps = Instance.new("IntValue")
jumps.Name = "Jumps"
jumps.Value = 0
jumps.Parent = leaderstats
local level = Instance.new("IntValue")
level.Name = "Level"
level.Value = 0
level.Parent = leaderstats
end
game.Players.PlayerAdded:Connect(onPlayerJoin)
--local character = script.Parent
-- local humanoid = character:WaitForChild("Humanoid")
-- local JumpCounter = 0
-- JumpCounter = jumps
-- humanoid.Jumping:Connect(function()
-- JumpCounter = JumpCounter + 1
-- end)
My question is how would I get it to count the jumps? Nothing I have tried so for has worked. Do I need to make a new script somewhere else? Or is keeping it in the PlayerSetup ok?

3 comments
uh just add the Jump value
also you can simply just listen for the event inside the onPlayerJoin function
The "Jumping" event fires twice: once when the player enters that state and once when they leave that state. I'd recommend being careful of that when you implement a system like this.