I want to add an obstacle course to only one section of a level like a maze but thta

i want to have an obstacle course kind of like a maze inside my level without it continuing to loop how can i make/fix this?