Rooms

im currently trying to make a game that has different rooms in it.

i have 2 frames, 2 doors. i have a layer with my character on. and when it hits the door it gets stuck in a loop with the two frames.

does anyone know how to fix this?