It isn’t a ModuleScript in this case but I did find a solution I am ok with…
workspace.DefineScript
local stop = Instance.new("BindableFunction",workspace);stop.Name = "Stop";
function stop.OnInvoke(scr)
wait() -- This yield seems to make all the difference
scr:Destroy()
print (scr,"Destroyed!")
end
This is good enough because the calling thread can’t continue as it is waiting for the Stop BindableFunction to return a result, and will likely be terminated before it gets its answer. The magic happens in the wait() statement, as the old thread relinquishes control to a new/other thread.