Two ways to walk through walls. The first uses the Ghost effect in Change Colour Effects block, for Scratch cat, it is getting invisible or fading and for the Blue cat it is appearing. Click the Green Flag for this way. The second is by "slicing" the sprite to make smaller pieces and switching costumes to make it disappear by smaller and smaller sections or re-appear by bigger and bigger sections. Click Right Arrow for that coding.
Thanks for the idea Athena.