how would i make a checkpoint system where when you touch a part you have your spawn set there so when you die you come right back. While also having a spawn when you first join which is the same as other peoples.
also maybe can someone let me know how i can make a save system so when you leave the game you come right back to the spot you left at. Im not that great at datastores.

9 comments
You want a tutorial?
Yes please that would be nice
The Checkpoint affect is given by assigning the 'RespawnLocation' attribute of the Player that made contact with the respective SpawnLocation Instance. Normally, these are all stored with an ascending name-base of "Checkpoint{#}" within a Folder in workspace.
Each Player is given a "Stage" (IntValue) leaderstat that corresponds to the current Checkpoint number. With it, it is used to affirm the legitimacy of the Checkpoint claim, by checking whether or not the mathematical evaluation of:
CheckpointNumber - Stage.Value == 1
Proves true. This simply affirms whether or not the contacted SpawnLocation is one further than the current allocated Checkpoint; ultimately preventing Checkpoint-jumping.
For ease, we iterate over all "Checkpoint" Instances within the folder to a). Determine 'CheckpointNumber', and b). Initiate the collective Touch response Callback.
For Checkpoint Persistence, you can simply create a GlobalDataStore to track the Checkpoint Value of the Player's who left; check to see whether it is above zero or less than the total stage count to set. This way you're not storing a Stage of 0 (Spawn) and allowing others to return to the win-zone every time; I suggest you call ':RemoveAsync()' at this time to eradicate their Checkpoint track.
This will allow them to restart. Likewise, use ':IncrementAsync' on the GlobalDataStore, and a ':GetAsync' affirmation to load an existing stage track.