Skip to content

This page isn’t translated yet: the English version is coming soon.

— —

Checkpoint

Faire réapparaître le joueur à la dernière étape atteinte.

Aussi appelé checkpoints points de sauvegarde

C’est quoi ?

Un checkpoint est une SpawnLocation numérotée (attribut Etape). Quand le joueur la touche, on règle sa RespawnLocation et on enregistre son étape, seulement si elle est plus grande que l’actuelle.

Exemple en Luau
local Players = game:GetService("Players")
for _, cp in workspace.Checkpoints:GetChildren() do
    cp.Touched:Connect(function(hit)
        local j = Players:GetPlayerFromCharacter(hit.Parent)
        if not j then return end
        local etape = j.leaderstats.Etape
        if cp:GetAttribute("Etape") > etape.Value then
            etape.Value = cp:GetAttribute("Etape")
            j.RespawnLocation = cp
        end
    end)
end

Erreurs fréquentes

  • Accepter n’importe quel checkpoint : un joueur qui retombe en arrière perd sa progression.
  • Laisser Duration à 10 sur les SpawnLocation : un ForceField apparaît à chaque mort.
Documentation officielle Roblox (en français)

Utilise Checkpoint dans ton propre jeu

Avec LearnBlox, tu crées ton jeu Roblox pas à pas, directement dans Roblox Studio. La formation « Les bases » est gratuite et Bloxi t’aide quand tu bloques.

Start for free