Checkpoint obby


I already deactivate all of them and I appear there

is there a checkpoint for the start?

set Auto Assign off. thats why your spawning at random places

yea, thats why. Also, are you sure you created the string value for checkpoints inside of the player? Just making sure because the whole script will error if you didn’t.

no, I didn’t, I think that’s also why since I put the first checkpoint enabled and I appear in the air
edit: How do I do it? Could you tell me

alright, I will make the checkpoint value when the player first joins the game. replace the old script with this new one:

for i,v in pairs(workspace.Checkpoints:GetChildren()) do
    v.Touched:Connect(function(hit)
        if game.Players:GetPlayerFromCharacter(hit.Parent) then
            local player = game.Players:GetPlayerFromCharacter(hit.Parent)
            player.Checkpoint.Value = v.Name
        end
    end)
end

game.Players.PlayerAdded:Connect(function(player)
    local Checkpoint = Instance.new("StringValue")
    Checkpoint.Name = "Checkpoint"
    Checkpoint.Value = "Spawn" --Change this to the spawn checkpoint's name.
    Checkpoint.Parent = player
    player.CharacterAdded:Connect(function(char)
        wait()
        local checkpoint = workspace.Checkpoints:FindFirstChild(Checkpoint.Value)
        char.HumanoidRootPart.CFrame = checkpoint.CFrame
    end)
end)

Checkpoint.Value = “Spawn” --Change this to the spawn checkpoint’s name.

What do I put there? if I put 1 it will always take me to the beginning.
edit2: or do I activate all checkpoints back?

No, you dont need to activate all checkpoints as it is meant to teleport the player to the checkpoint. What is the name of the Checkpoint inside of the spawn?

1, 2, 3, 4, 5, and those, I don’t understand exactly
Do you want me to put the script inside the checkpoint?

so if you mean the name is actually “1” then change it to Checkpoint.Value = "1"

It can’t be, I love you, you are my idol, you solved the problem I have 1 day ago, thank you very much!!! <3 :smiley:

Please do not create topics to ask people to make scripts for you.