I am making a game that is a sidescroller and down the far side of the path there is dragons place in one place that use the fire particle effect to blow fire across the path what im am wanting to do is turn the fire particle effect and the incisbale collider that is in it off and on on 10 sec intervals. This is the code I have to turn it off and on but to do it over and over I need to loop it and i cant seem to get it to work.
// Emit particles for 10 seconds
particleEmitter.emit = true;yield WaitForSeconds(10);
// Then stop
particleEmitter.emit = false;yield WaitForSeconds(10);
// Emit particles for 10 seconds