I am trying to destroy an object at the start of a specific wave. I currently have an on screen gui that keeps track of each wave and a spawn controller that tells the gui what wave it is with the var currentWave. I am using the gui script to destroy the object. This is the script.
I keep getting an error saying "Assets/Scripts/WaveManager.js(8,16): BCE0044: expecting ), found '='. " and Assets/Scripts/WaveManager.js(8,18): BCE0043: Unexpected token: 4.
What do I need to change if(currentWave = 4) to in order to make this work?