Thanks for playing my game... Yeah, stopping when colliding walls was really difficult. I used 8 small raycasts on each side of the character checking if there is a hit on both the left and right or up and down of the character if there is the scaling stops. Then whenever you scale and have a wall to your right but not to the left, the character used to clip through the right wall, so I had to move the character a bit to the left whenever it scaled to the right and had a wall to the side. I will upload the code to github in a few days (It is such a bad code, 2 days was not a long time). Anyways thanks for playing, and I'll let you know when I upload the code