Does game.Players.PlayerRemoving fire when a player is teleported with TeleportService?

I need a way to distinguish if the player disconnected from the game or teleporting to another server.

Yes, it will still fire PlayerRemoving.

To be fair, if they are teleporting to another server, then that means that your code somewhere is teleporting them. Thus, you should still be able to distinguish this quite easily since you have control over the teleportation process.

2 Likes

Yes, I’m trying to work it out via that method.

I’m trying to make a 4-players squad system to work cross-servers and it needs a way to tell if a player is teleporting or disconnected from the game so it can free up the slot in the squad.

Currently I’ll just use a 10 seconds delay on game.Players.PlayerRemoving to check 10 seconds later if the player is still in the same universe.

What’s wrong with using this method?

1 Like

Does Player.OnTeleport fire before or after game.Players.PlayerRemoving?

Edit: Great! It does, thanks @Scriptos.

1 Like

Looks like TeleportPartyAsync can help.

1 Like