Bots don't despawn if the player is dead and the game is ended manually

Please select what you are reporting on:

Creative

What Type of Bug are you experiencing?

AI

Summary

Simple. If the player is dead, bots spawned by the NPC spawner don’t despawn when game is ended

Steps to Reproduce

  1. Have an NPC spawned by NPC spawner (I use a custom script for the behaviour)
  2. Kill yourself (I do it by fall damage)
  3. Before you respawn, press “End Game”
  4. You should see the bots in the island while it is still editable

Expected Result

The bots should despawn like normal

Observed Result

The bots should continue to do what they were doing before, uninterrupted

Platform(s)

PC

Island Code

None

Additional Notes

^ proof