You can write your topic however you want, but you need to answer these questions:
I’m trying to save a player’s data once they leave the game (I can’t figure out the simplest way). There’s only one script saving data.
The issue is I keep getting the “DataStore request was added to the queue” error every time a player leaves the game… and most of the time they lose data when joining back.
I’ve tried searching through many different posts on the same topic but none of them are quite the same as my script.
-- local CharData = {
(insert data values here)
}
game.Players.PlayerRemoving:connect(function(player)
Data:SetAsync(prefix .. tostring(player.UserId), CharData)
end)
end)
end)
If I could get some help with this … that would be great! Been trying to figure out data stores for a couple years and it’s always been setting me back on updating this game.
It’s mainly the character added function and the player removing function in the same line … would “character added” and “player removing” have to be entirely separated maybe?