no "pointers" to get directly to a variable passed to a function?

it's hard for me to think of a proper name for this problem. if I get it, then I'll change the title,

the thing is that if I use this function

var delay = 0.3;
function Delay(bool:boolean){
    yield WaitForSeconds(delay);
    bool = !bool;
}

on some boolean, to turn it off over time of "delay" seconds, I am not really changing the boolean that I passed. I'm just changing the temporal "bool" variable declared in here.

How to change the value that was passed to that function?

You actually couldn't do it the normal way of using a ref parameter due to how coroutines work

On the other hand, what you could do is pass in an instance of a custom class, which has a bool inside of it:

class BoolWrapper
{
    var bool : boolean;
}

Using it:

var wrapper = BoolWrapper();

function Start()
{
    wrapper.bool = false;
    Delay(wrapper);
}

function Update()
{
    Debug.Log(wrapper.bool); //this'll change after 0.3s
}

And the modified original coroutine:

var delay = 0.3;
function Delay(boolWrapper:BoolWrapper){
    yield WaitForSeconds(delay);
    boolWrapper.bool = !boolWrapper.bool;
}

The class will be passed by reference instead of by value, so when you change the bool inside of it, it's changing the original value