Roblox how to make your game have New Game/Load game

Im making a game where it has missions

In-game (Lets say whenever a new mission is triggered (i use bindableevents) its like a checkpoint, so if the player would load the game he would exactly have that exact same event getting instantly triggered and spawn where he was left off)

In-menu (how could i make it so whenever the player pressed “load game” that data would load)

And the opposite for “new game”

1 Like

use datastore to save and load the players last checkpoint

1 Like

appreciate it but id like to someone who could be more detailed

local db = game:GetService("DataStoreService"):GetDataStore("PlayerData")

-- load checkpoint
function load_Data(plr)
	local Key = "Plr_"..plr.UserId -- key to our data
	local Player_Data = db:GetAsync(Key) -- gets the saved data
	-- teleport the player to his checkpoint using "Player_Data" variable

-- save checkpoint
function Save_Data(plr)
	local Key = "Plr_"..plr.UserId
	local Your_check_point_Data = nil

thesse functions are far from perfect but should give you an idea of how it works