I think it’s because you’re doing it from inside the player.
This code kills the player, so the last part never gets to run.
Have you got the editor set to use the player start?