How would I make a global leaderboard for a timed obby?

  1. What do you want to achieve? I want to make leaderboard of how long it took for someone to finish an obby.

  2. What is the issue? I simply don’t know how to put the pieces together to make this.

  3. What solutions have you tried so far? I did not know where to start so I have “tried” yet.

here is the link to the game:

So where would I begin with this?
What functions do I need?
Do I need remote events?

Any help would be very appreciated!

`

1 Like

What exactly would the leaderboard display? What information would it give?

1 Like

The leaderboard would display how long it took to get to the end.

I would put the leaderboard on the starting platform

1 Like

So this would update after the end of every round with the results?

1 Like

It wouldnt be a round system

I think I would make an option at the start to “do the obby competitively” and anyone could do it at any time

1 Like

Oh ok, that makes sense.

The first thing I would do is hook up a Touched event to the starting brick of your obby (make sure you include a debounce here, if you don’t know what that is, then search it up). This allows the server to detect when players touch the brick.

local brick = workspace.brick
brick.touched:Connect(function() --Blah Blah Blah

Then, I would create a variable for that player that represents their time.

local playertime = 0

I would use some kind of loop to add 1 to the playertime variable every second. This allows us to track the time the player is in the obby.

repeat 
playertime  += 1
wait(1)
until 

Now we have the final step - to connect a touched event to the ending part of the obby. This allows us to figure out when the player has finished. Then, we can just send that data over to the leaderboard using a bindable event and were done!

Sorry if this was really vague, but I’m pretty short on time.

Thank you,

this is really helpful

1 Like