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.