Make sure to check Save and close when done in the dialog when you edit the script, when you’re ready to make a droplet from an action (such as for batch processing). Please refer to the Photoshop instructions for how to make a droplet.