Help with Datastore saves overlapping

Hey forum, I’ve got a tricky problem today.

My game loads on join and saves on exit. This works fine… until it doesn’t. The problem that’s arisen is that often times people’s save files can overlap when they rejoin quickly. For example, I leave the game, and the save takes 3 seconds long. Maybe, it even yields for the datastore cooldown limit and it takes 10 seconds. This doesn’t matter though, I’ve already rejoined the game and my last save has overtaken my previous save because my old data loads instantly as I join.

This becomes much worse when using quick teleport service between places. The only possible work around for this would be to yield (5) seconds after joining before trying to load any Data, to allow the most time for saving.

So, my dilemma is bad. How do you guys handle this occurence?

I’d try to put some kind of debounce that stops the data from loading if it’s still being saved for the same player.

That’s the thing, if I knew that the data was saving I would know the save file (implying something was already saved on exit anyway).

I’m talking cross server btw

I would like to wait, maybe, 6 seconds after a new Player joins the server before queueing the datstore. Problem is, you must make them wait on a Loading screen, although I’ve seen games have long loading screens.