Change which script is running a thread

Hey so I have a script that spawns a mob through a module, then that script destroys itself. However the mob stops working after the scripts deletes itself. Is there a way I can move the AI stuff to run off of another script (without hacky remote work)? If not, I’ll just move the scripts elsewhere so that the place stays tidy.

your going to need to elaborate on how your NPCs work

if they are all the same u can have a single script in serverscriptservice. But why does the script delete its self?

Perhaps Bindable Events is what you’re looking for?

Because mobs are spawned via parts in the workspace when the game loads. I think I’ll just use attributes or something to figure out their individual variables and have the serverside entity class spawn them…