Attempt to perform arithmetic (sub) on nil and number

I’m trying to make an obby checkpoint system that saves progress. It’s working, but buggy and the console is being spammed with errors.

Script:

1 Like

that error looks like it’s because StageNum is nil sometimes
maybe v.Name for some Checkpoints isn’t a string that can be converted to a number

do you know how i could fix it? havent dont something like this b4 so had to follow a tutorial

make sure the names of all the checkpoints are something like: “1”, “2”, “3”, “4”, “5”
instead of something like “Checkpoint 1”

ahh thanks for reminding - just saw that someone put a spawn into the folder