Beta
Registers a script-based event handler for handling what happens when an entity spawns.
Protected
This function can't be called in read-only mode.
This function can throw errors.
Registers a script-based event handler for handling what happens when an entity spawns.