Hello float destroy question...

Hello, I need an object to destroy after a couple of seconds. well 0.5 seconds to be exact…

I was wondering is there a way to do this, because currently the float variable will not let me do this.

Currently I just hide the game object mesh renderer straight away and then destroy the object completely after 1 second… but was wondering if there is a more efficient way to do it. Thanks in advance!

Destroy(gameObject,0.5f);