i tried watching a tutorial on yt but it didnt work so idk
the script on the video was:
local Checkpoints = workspace.Checkpoints
game.Players.PlayerAdded:Connect(function(plr)
local leaderstats = Instance.new("Folder",plr)
leaderstats.Name = "leaderstats"
local Checkpoints = Instance.new("IntValue",leaderstats)
Checkpoints.Name = "Stage"
Checkpoints.value = 1
plr.CharacterAdded:Connect(function(char)
wait()
if Checkpoints.Value > 1 then
char:MoveTo(Checkpoints:FindFirstChild(Checkpoints.Value - 1).Position)
end
end)
end)
for i, v in pairs(Checkpoints:GetChildren()) do
v.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local char = hit.Parent
local plr = game.Players:GetPlayerFromCharacter(char)
local Checkpoint = plr.leaderstats.Stage
if tonumber(v.Name) == Checkpoints.Value then
Checkpoints.Value += 1
end
end
end)
end
** You are now Level 1! **
