How do you make a Jump counter leaderboard?

you don’t need any other script as of now, but in case you will need them later, you can just simply disable them for now and test if this one works.

1 Like

am i supposed to have it in r15 or r6?
(still not working)

that script should be placed in ServerScriptService as PlayerAdded event is useless there, everything from StarterPlayerScripts gets placed into the Player once they join, so it won’t run until the Player loads with all the scripts, you could’ve also done this via LocalScript but it’s alright now, also, can you let us know if you get any errors in the output?
and yes, it should be:

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

and not

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

it is correct but you forgot to parent it.

1 Like

You forgot to parent Jumps to Leaderstats

1 Like


fixed it

but it wont show up on in the game

There isn’t an instance called “Jumps”, it should be:

local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player

and not what you currently have, which is:

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

please don’t change anything other than this and you should be good to go.

Make the F uppercase in folder

1 Like

when i jump it does nothing.

I think the event is called StateChanged, and not StateChange. Put a “d” at the end and it should be fixed

1 Like

image
put a d at the end of this?

1 Like

yes. (30characarters34421gfhfgh

works! but VERY unresponsive. I did 20 jumps and it said I did 4

example of that:
robloxapp-20200322-1208291.wmv (4.1 MB)

Maybe this way will work better:

player.CharacterAdded:Connect(function(character) 
local humanoid = character:WaitForChild("Humanoid")
humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
if humanoid.Jump == true then
jumpCount.Value = jumpCount.Value + 1
end
end)

Replace your old character added function to this, and let me know if it works.

its great but look. I did 5 jumps but it gave me 7.
robloxapp-20200322-1243103.wmv (903.8 KB)

image

when held space bar it gives 2 per jump

Maybe add a cooldown? Like this:


player.CharacterAdded:Connect(function(character) 

local humanoid = character:WaitForChild("Humanoid")
local debounce = true

humanoid:GetPropertyChangedSignal("Jump"):Connect(function()
if debounce == true then
debounce = false
if humanoid.Jump == true then
jumpCount.Value = jumpCount.Value + 1
end
wait(0.2)
debounce = true 
end
end)

like that? image

Yep, this would give it an 0.2 second cooldown. Maybe the problem was that it sometimes fires twice rapidly.

but now the leaderboard wont show.