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)
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
return
end
-- save checkpoint
function Save_Data(plr)
local Key = "Plr_"..plr.UserId
local Your_check_point_Data = nil
db:SetAsync(Key,Your_check_point_Data)
end
thesse functions are far from perfect but should give you an idea of how it works