How to make an if-else

I want to know how to make an if-else so I can make a block have no friction when the player touches it from the side.
image
Yes, everybody who was helping me with my previous issue, this is my original game. I just redid everything just a touch :wink:
Here’s the link:

I don’t know.If I knew I would be not created an infinite loop twice in the development of E-Man The Game.

what is the If-else for? shouldn’t the code in that image work?

NVM. I used your example for materials, and it worked.