You need to set at least one collectible and a finish flag in the same level. Then click on the finish flag you set in the level and select "Collectible needed for opening" :)
thank you!!!