Player Respawn - 2D Game Beginner

Hello
I am writing this because I have a problem with respawning and creating a Killzone for a cube I have been following this tutorial as I managed to get far in it.

However, when I play the game and try and die The script doesn’t seem to be working. Keeps saying player tag not defined.

Here is my script for the Killzone respawn
Above: Kill Player script

and my original script for my cube.

Thanks again for your tjme

Your code is looking for a tag on the object called “Player.” Is your player object tagged as such?

Tags in Unity

1 Like

Case matters, so tag Player as “player” to make your code work. There already is a tag called “Player” you can use and change your code to match.

1 Like