How do I spawn an AI by time?

Hello, I am making a simple survivalgame with AI characters. I have my AI character completely set up. But I want to spawn an AI every 5 seconds. If somebody could help me with this I would be very thankful! Thanks in advance!

make an actor , on event tick add an delay node with time of 5 seconds and then add spawn actor from class select the enemy from the list (on spawn actor from class a purple colored area with ‘select asset’ or something similar) set the location in vector and add that actor to level.

Make an actor and place it in your world. Inside this actor have a float variable that is 0 and increases with Delta Time on event tick. Then check if it is equal to or greater than 5. If this is true spawn your AI (Using spawn actor of class). Also make sure that your AI character is auto possessed when placed or spawned in the world.