I believe you are understanding the question properly, and I'm not one of the closures, but I think I've got a pretty decent idea as to why it's closed.
When it comes to questions asking for scripting or code, we generally like to know not only what the asker is trying to do, but also how they're trying to do it. This is because when it comes to code, the possibilities in how to accomplish the task are nigh on unlimited. Especially in Minecraft, which I understand is incredibly versatile in the customization aspect. The question needs to be narrowed to give readers a clear idea of where they're stuck.
This is generally why we like to ask what they've tried; it's a little nudge for them to give us something more to go off of than a general feature request, and then is something we can use to narrow down the specific problem (eg. you got this part of the syntax wrong). It's something I try to emphasize whenever I can: we expect askers to show effort; expending a little now means you won't have to respond to comments asking for clarification or editing your question because the initial draft got closed. Spend now to save later. And then everybody wins.
It's the same reason why there's so, so many duplicates for Minecraft scripting; there's an assumption that the asker understands what their code actually does, and doesn't need a perfect copy and paste solution to accomplish their task. By stepping back a little and trying to generalize the issue, it's more useful to far more people than a single specific solution that only helps the asker.
It's unclear because we don't know how the asker is trying to accomplish the task. We need something more to go off of, preferably a code sample of where they're stuck.