I have heard the myth that cats hate foil and won't walk on it. I have never tested this on my cats, but I do use foil to keep them from scratching stuff.  That works.

I found this video that tests the theory. Guess what happens?