that's built into GB Studio, when you draw your collision squares, there are custom ones such as collision top, left, right and bottom. that way it will stop you from the one side, and let you pass through the other.