im fairly new to scripting, ive tried to make my own script for saving checkpoints, but it doesnt work.

Script:

leaderstats = player.leaderstats Stage = leaderstats.Stage CheckpointNumber = game.Workspace.Checkpoints:FindFirstChild(Stage.Value, game.Workspace.Checkpoints)

local spawn.Position = CheckpointNumber


all the checkpoints are named, 1, 2, 3, 4, etc, and are under a folder in workspace called Checkpoints

1 comment

0

use datastore