To anyone who wants to use this script here is a tip: Make copies of the enemies you want to spawn and set their spawn type to instant. This will make the spawning look better.