Sprite not extending arms when hitting a wall

Hi, the sprite in this code is not “extending it’s arms” when hitting the wall. I compared this code code with working code and cannot find what the problem is. Please help!

Thanks in advance.

It works for me.