Datastore Service Saving Twice - Feedback on Possible Solution

Good afternoon,

So I was experimenting with DatastoreService. I currently have 2 functions that will save a player’s data.

Players.PlayerRemoving and game:BindToClose()

So I was wondering since my game is a SinglePlayer game, would it be better to only use game:BindToClose(), or keep the two functions?

When a player leaves my game, both of these events are fired, so I am left with 2 “yay” outputs as the confirmation that the data was saved. All I want is a simple solution. Thanks!

As long as .PlayerRemoving still fires when a server is manually shutdown by the developer, you can simply just stick to it instead of having BindToClose as an addition. Though, I’d definitely test that out first.