How do i destroy those obstacle?

On your Obstacle class blueprint, set its lifetime to 5 seconds.

Go to the blueprint class defaults,

266167-0.png

Look in the actor category (or type lifespan on the search box)

266168-1.png

And set it to 5.0.

Now the actor will destroy itself after 5 seconds.