As was said, both by you and by clarkstill:, the equipment you have is not the best one suited for the task. I think the procedure is still possible, just not quantitatively efficient. People have conducted pryolysis since pre-Iron Age technology, to make carbon from wood -- yes, some oxygen gets in, and some material burns, but when the oxygen is depleted, even locally, pyrolysis is what you get.
Since you can see a gap, you should certainly be working in a fume hood, and keep it as closed as possible for maximum exhaust (which is not always completely closed -- follow hood instructions and/or determine maximum exhaust position with light paper.)
This really depends on what you need to do: do you need a small sample of possible pyrolysis products? Then you may get something. Do you need to determine possible products of a poorly done pyrolysis -- aka, environmental products of polystyrene burning in a trash heap? Then this is almost exactly what's needed. You make a little and then analyze them?
What actually is the process you need to perform, and why? If the teacher wants you to produce the products of pyrolysis, to have a quantity of the pyrolysis products, can't they just be purchased?
Here's the real help that you really need. Write down, on paper, what you need to do. Write how this rig will allow you to do it. Also write down, how this rig won't allow you to solve the problem at hand. And the safety and environmental risks you face. Consider making a table of pro and cons. Then present this document to the teacher.
Listen, in the real world, academia or industry, no one likes any one who just sputters "No, it can't be done." Heck, I don't like it when people on this forum show up and say, "I can't do thins." And people don't like being told by me, "No, you can't make drugs or bombs in you basement." The entire point of any intellectual discourse is to support your point of view with evidence -- or at least proof that you've thought about the problem carefully.