Saving Obby Checkpoints – Roblox Scripting Tutorial

Use DataStores to save checkpoint stages for your obby with this Roblox Scripting Tutorial from AlvinBlox. If you missed the previous video about creating obby checkpoints then make sure to watch it.

Link to previous video: https://youtu.be/Aa83VYif6VA

Become a Member today for exclusive perks and to support my channel!
https://www.youtube.com/channel/UCp1R0TBvgM7gj0rwTYULmSA/join

Subscribe to my YouTube channel for more scripting videos:
https://www.youtube.com/alvinblox?sub_confirmation=1 />
► Watch my full beginner scripting series:
https://goo.gl/k3erz2

Got video suggestions or feedback? Contact me via my website
https://www.alvinblox.com/

Roblox username: Alvin_Blox

The music in this video is licensed from Epidemic Sound
http://www.epidemicsound.com

Alex
Alex

Hi, I'm Alex! I've been obsessed with Roblox ever since I first started playing at the age of 15. Now at 25, Roblox is still my number one hobby and passion.

When I'm not working my day job, you can find me gaming for hours on end, playing and creating all kinds of imaginative worlds. I love participating in building challenges and mini-games with friends. My favorite thing is designing intricate obstacle courses and racing tracks.

I run a Roblox gaming website where I post articles, guides, and tips about my gameplay and creations. I provide tricks and advice for fellow adult gamers and try to keep things entertaining with my fun writing style.

Articles: 2951

14 Comments

  1. The code I ended up with that worked was:

    local DataStoreService = game:GetService("DataStoreService")

    local DataStore = DataStoreService:GetDataStore("ObbyDataStore")

    game.Players.PlayerAdded:Connect(function(player)

    local data

    local success, errorMessage = pcall (function()

    data = DataStore:GetAsync(player.UserId.."-stage")

    end)

    if success then

    print("Success")

    if data then

    player.Team = game.Teams[data]

    else

    player.Team = game.Teams["Stage 1"]

    end

    else

    player.Team = game.Teams["Stage 1"]

    end

    player:LoadCharacter()

    end)

    game.Players.PlayerRemoving:Connect (function(player)

    local teamName = player.Team.Name

    local success, errorMessage = pcall (function()

    DataStore:SetAsync(player.UserId.."-stage",teamName)

    end)

    if success then

    print("All went well")

    else

    print(errorMessage)

    end

    end)

    Hope this helps!

  2. I did the script but every time I go back in I always start on stage 2 and not stage 1 and when I leave the data doesn’t save

  3. OH MY GOD THANK YOU IVE BEEN SCRIPTING FOR 2 dAYS TO TRY TO FIGURE OUT HOW TO DO IT
    AND YOU DO IT IN 10 MINUTES YOU'rE A LIVESAVER

  4. 15:07 for some reason on player load character it says "Failed to apply character appearance, player not in world". Literally tried making 4 games but every game had script error i couldn't understand or find it. I guess some people just can't be developers. I give up.

  5. I would love it if you made a video explaining how we can make it to where players have to touch the spawn of the next stage and make it to where they cant touch a stage 10 stages ahead and can't touch spawns that are stages behind.

Leave a Reply

Your email address will not be published. Required fields are marked *