Utilities 5 min read

Build Checkpoints and Timers for a Roblox Obby

Create an obstacle course that remembers each player's checkpoint and tracks each best time.

Number the stages

Build a floor and create a CheckpointPads folder. Put anchored parts named 1, 2 and 3 inside it. Have the server record the highest stage reached on the Player. When a character returns after a reset, pivot it above that stage so it starts clear of the pad. Test touching a lower checkpoint after reaching a higher one.

Track the race on the server

Place RaceStart and RaceFinish at opposite ends. Store a start time per player and clear it on finish or reset. Calculate the duration using the same clock for both timestamps. Keep the last time and personal best as player attributes so the HUD can display them on demand.

Close shortcuts before adding rewards

Add one more gate halfway through. A finish should count only after the required stage is recorded. Try deliberately skipping a stage and use Studio's two-client mode to verify that one player's reset never cancels another's run.

Make the map easy to reset while building

Start with a straight course and three islands where players can safely stand. Put the anchored checkpoint parts in a folder named CheckpointPads. Use simple ascending names such as 1, 2 and 3. Add a safe floor under the entire course while developing so a bad teleport is easier to observe. Put the original SpawnLocation at the beginning and give each checkpoint a visible marker. Leave several studs of space above every pad. When a character is moved to a checkpoint, its root should begin clear of the pad and any overhead geometry. Test with your intended avatar sizes rather than relying on the default rig alone.

Keep progress with the player

Place the checkpoint script in ServerScriptService. A Player survives a character reset, while its old character model does not. This makes the player attribute a useful place for progress that lasts for the current session. When a checkpoint is touched, identify the player from the model that owns the touching part. Update only when the new stage is greater than the recorded stage. An avatar can touch more than once as arms and legs meet the pad. A greater-than comparison makes those duplicate touches harmless without needing several overlapping timers. If you later let players restart the whole course, clear their checkpoint stage explicitly when they select that action.

local function recordStage(player, stage)
    local previous = player:GetAttribute("CheckpointStage") or 0
    if stage > previous then
        player:SetAttribute("CheckpointStage", stage)
    end
end

Pick a clear rule for interrupted attempts

Put RaceStart near the original spawn and RaceFinish at the far end. Use an absolute server timestamp at the start and subtract it from a second server timestamp at the finish. Clear an active run if the racer resets, as the linked timer does. That rule allows players to use checkpoints for practice, while making a timed race a continuous pass through the course. If you want checkpoints to preserve an active timed run, document that rule and count the time between characters as part of the attempt. Decide before adding a rewards table. Mixed rules can make it unclear why two players with the same route ended up with different results.

Verify direction and route completion

Walk through checkpoint 2, then return to checkpoint 1. Reset and check that the character lands above checkpoint 2. Try crossing the finish before touching the start. The race should not produce a result when it has no start time. Then run the full route and check that the first completed time becomes a personal best. Complete a slower run and verify that the most recent result changes while the best holds. Go back through the route faster and compare again. When a finish unlocks a reward, also require a stage or gate associated with the current run. A checkpoint reached in a prior run may not establish that a player took the complete route this time.

Test two players and check feedback

Run a server and two test players. Have one player begin a race, reset the other player and then let the first finish. Each player should keep separate stage data and a separate race clock. Add a small label showing the stage and latest recorded time. Format decimals locally for readability and leave the precise result in the server value. Readers may also want to see whether they are in practice or timing mode, so provide a clear display near the start line. Once the mechanic works, remove the development floor and make sure falling still sends players to a usable checkpoint. Try the entire course once at the default walking pace before adjusting the timer or the jump distances.

Related scripts