get object invisible for couple seconds and get visible again

hey guys i need script for , to make object invisible for a time , like when i click on ’ key G’ the object get invisible and after 3 seconds it gets visible again , help please , thanks.

Do not ask for scripts. Try to learn on your own first.

for timers, use Invoke(). 10000s of questions on here about it

1 Answer

1

I’m pretty noob so i cant answer at 100%
but you should try something like this :

function Update () {
        if (Input.GetKey ("g"))
	renderer.enabled = true);
    }