PLEASE HELP WITH ENEMY RESPAWNING

Hello community im currently working on a game and i have a problem i want the enemy to respawn after about 5 seconds of it dying i made a script but i dont think its working properly please may one of you have a look for me

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Respawner : MonoBehaviour
{
public Respawner GetRespawner = enemy_rifle();

private static Respawner enemy_rifle()
{
throw new NotImplementedException(); }
public Respawner respawner = enemy_rifle();

public Respawner(Respawner respawner)
{
this.respawner = respawner;
}
}

It is probably not working properly because none of the code you posted appears to have anything to do with what you said it is supposed to do.

Im sorry its just im new to unity and coding aswell

You might want to try looking through a few more tutorials before you set out to do your game - that’s quite a complicated and tricky thing to do and unless you have the basics nailed you’re going to find it really really really really really really really really really really hard. I think following through some YouTubers’ example projects/scripts/games tutorials would be a good way to learn. Maybe someone can recommend some good beginner tutorial series, but here are a few to get you started:

  • seems like a good place to start.
  • example of a 2D game.
  • something else I found.
  • seems like a mixed set of tutorials rather than a single series but might be useful.

Give it a few months, and then when you feel ready you can start testing out some ideas, and then take it from there :slight_smile:

Okay thank you so much I’m gonna learn to help others out in the future and make a game ill follow your advice aswell

Best of luck