Skip to main content
edited tags
Link
congusbongus
  • 14.9k
  • 58
  • 89
Source Link

How can I make my game wait a number of seconds before the player respawns?

I want to add some particle effects for when I die so the player appears to explode upon death, but I am not totally sure how I can stop the player from respawning long enough for this effect to carry out. I currently have some code that just reloads the scene when you die, but I was fiddling with the idea of some way to make the script wait a number of second before executing the respawn method. I saw something in another post on the unity forums about a coroutine, but I am not sure how to make that work as I am pretty new to coding. Any help is greatly appreciated.