I had trouble early on with collisions but now everything works. I made the player start over when hitting un-friendly items on both levels, and loaded new levels when getting to the finish, which you’ll see is the red portal.
As in the example, there’s a lighting bug but I don’t have time to fix it nor does it really make a difference. Here’s a little video showing how everything works - on both levels I purposely hit an obstacle, and I also finish. I went a little bit above and beyond though - watch the whole thing to see what happens when you finish the second level.