How to make checkpoints but not with levels

So i’m making a game that looks like an obby but it is not. i want to make checkpoints and i know you can find much videos on youtube but i wanna make a checkpoint without levels.

If u just walk one the part it will save your position and if u die, u will respawn back on that part.
Is it possible to make that and if it’s possible, can you tell me how it works? I already search for saving location but i can only find it when a player leaves the game and not when a player dies.

I don’t want you to give me the script because i’m just a beginner in scripting and i wanna challenge myself so i can learn more about scripting (i hope so).

1 Like

So you can create a intValue in player or make a table, which ever you prefer. So what you would do is whenever the checkpoint is touched change the value to the current Checkpoint. So lets say in a table you have this

table = {
    ["Checkpoint"] = 1, -- Spawn
}

When they touch the second checkpoint just update that value to 2 and so on.

2 Likes

What I would do is name the parts with numbers that increase by 1. Example, the first part is called 1 and the second 2 and so on. And make it so when the player joins, an intvalue gets added to their Player instance and when they step on a part, that IntValue’s Value gets changed to the name of the Part as a number, and when you die, just teleport the player back using the Value you have in the instance

3 Likes

For this you don’t even need to script, A more simpler way of doing it would to simply go into the toolbox and use the obby spawn set roblox has given. This allows the players spawn to be saved without the need of a leader board and is really easy to do.

2 Likes

True, but he wants to challenge himself to script it himself.

1 Like

like Mysterious_Myth11 said, i wanna challenge myself. you’re solution will come if i give up but thanks for the reply!

Everyone has their own way of improving in their scripting, just because you decide to use models to help you doesn’t mean everyone will. If OP wants to challenge themselves, then there’s no real need to mention that they should use the model since everyone learns in their own way. Even I would want a challenge to imrpove

Also, he didn’t make the post for no reason because there is a model for it, it’s a genuine scripting answer that can be answered, just because a model exists for the exact same purpose he wants doesn’t mean this post is redundant, he could’ve not known it exists for example. This post will not be flagged since it’s breaking no rules of this category

3 Likes