Difference between Player.Disconnecting and Player.Removing?

Whats the difference between Player.Disconnecting and Player.Removing? I’m trying to make a data save script and I’m not sure which to use

If you’re using PlayerDisconnecting on a Script, then…

image

You got 2 options you could choose from:

  • You can either loop through all the players every i seconds (60 seconds would be fine)
  • You can save their Data using the PlayerRemoving Event (Which will listen when a Player Starts to leave in order to properly save their Data, and which is probably what you more want from your OP)
1 Like

https://developer.roblox.com/en-us/api-reference/function/DataModel/BindToClose

You may also find this useful, it’ll allow a function to execute prior to any given server shutting down.

1 Like