yield problem

Hi im using yield to assign a variable. But it will be assigned several times. How it could be assigned only one time ? it will be assigned several times because i call the method “testing” several times ?

function testing(){
yield WaitForSeconds(3);
variable = true;
}

Yes, if you’re calling testing() multiple times, then you’re setting the variable multiple times.