Bounce back when hit obstacle

I tried everything you said, but without success