Stack Exchange is not a good format for beginner "help me learn how to do this" questions. I'm sure there's a place for such questions, but Super User isn't it. (Remember, Stack Exchange is about professional or enthusiast questions/problems.)
Questions asking for scripts don't really help anybody but the original poster, and a few years ago would have been closed as Too Localized. Nowadays, the preferred reason is Too Broad, since boatloads of different scripts could accomplish the same thing. Downvoting is appropriate for unresearched/uninteresting questions even if they shouldn't be closed. Again, there's a place for such things, but to keep the quality and usefulness of this place up, we don't accept them.
There's also the issue of troubleshooting which you alluded to. Let's see what Stack Overflow has to say about that:
Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.
If the original poster hasn't tried or done any research ("not working plz fix"), the question is at best worthy of downvotes and probably should be closed as Too Broad, since teaching core concepts is not a task suited to specific Q&A like we do here. Therefore, such questions should include what was tried, what resulted, and what was expected.
If the question is simple and understandable but a little misguided, it'd be great if you could fix it up via editing and then answer it. (We even have a three-tier series of badges for it: Explainer → Refiner → Illuminator.) Demolishing it via close votes is acceptable if it's not OK in the current form, but there's certainly nothing wrong with bringing it back in-scope if possible. Since the point of Q&A is mostly the A, we love useful, canonical, quality answers even when the question was basic or initially dubious.
Thanks for asking how to keep Super User's quality high!