New Player and Character Destroy Behavior

Hi!

Once you mentioned this, I looked a bit deeper into the replication problem and did some tests. The character on client’s side won’t be completely removed automatically.

With the last year’s Destroy() news (Destroy() Can Now Replicate to Clients), one would expect local character to be cleaned up too, but the automatic removal apparently differs from manual.

The behaviour puzzled me for a while until I saw this at the very beginning of the announcement haha:

Which means,

  1. unaltered automatic behavior will not destroy the character locally;

  2. setting player.Character to nil will not destroy the character locally;

  3. calling player:LoadCharacter() will not destroy the character locally;

  4. calling player.Character:Destroy() will destroy the character locally (but don’t do this*);

  5. calling player.Character:Destroy() after player.Character has been set to nil will not destroy the character locally.

*Destroying immediately causes a bunch of “Player:Move called, but player currently has no humanoid. (x953)” warnings.

I guess we’ll be using a good old remote event for local removal (along with option 5).

3 Likes