#Does anyone have a Model for DATASAVING checkpoints that saves when you leave the game or reset
1 messages · Page 1 of 1 (latest)
idk how you want it but I would just make a stat in leaderstats called stages + save with datastore. then when player joins teleport the player to the checkpoint depending on the stage value
i want when the player steps on it they respawn there even if they leave example they step on stage 1 they respawn there if they reset or leave same with the other stages
go watch GnomeCode
I just helped someone with this funnily enough
First you need profile store to save what checkpoint the player is at
.
My system uses spawn locations so you can toggle them being enabled and disabled
.
Make a folder starting with 3 spawn locations
Name them "Checkpoint1" "Checkpoint2" "Checkpoint3"
Turn enable on all of them off but the first one off
.
Next you need to add a script with a touch event
Loop through the spawn locations parts in the folder
.
Then you need a custom function that updates the players checkpoint with the checkpoint they just touched
.
So when they step on the checkpoint fire the module script
local ServerScriptService = game:Get service("ServerScriptService")
local Services = require(ServerScriptServices.Modules.Services)
Then Inside of the Services module where you write custom functions
Get the data from the player
So when you touch the part you send the player and the checkpoint to the services function
It uses the player for the data
And the checkpoint for its name to save to the players data
Then you finally just need a script that enables the spawn location that matches in their data
And disables the last spawn location that was in their data
.
That's all you need