Data not properly saving when teleporting out of a match

There’s people reporting that their data isn’t saving in my game Toilet Defense Simulator (specifically that after a game finishes, they don’t get their coins). Once they win/lose the round, they’re displayed the amount they won (eg. 50 Skibs), and when they return back to the lobby, they simply don’t get the skibs they were promised.

It literally is not happening to me at all, but there’s so many people reporting it.

I’ve always had issues with DataStore since I’ve never been able to learn and just decided to make a quick system that I reuse over and over again

Perhaps you’re missing a :BindToClose() event when the player suddenly disconnects in favor of teleporting.

game:BindToClose(function()
    for i, Player in pairs(game.Players:GetPlayers()) do
        if Player.UserId == game.Players:GetPlayerByUserId(Player.UserId) then
            -- // Save the data if the player is still present
        else
            return
        end
    end
end)