Assign Script to new Object created by another Script

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nick74044

Hello,

I have a tool script which creates several Sprites via .new(). I want to assign these Sprites a script which I have already written.

I can do this via the Inspector, but is there some way of doing it in the tool script right after they are created?

Thanks for any help