OnDestroy
function OnDestroy()Called when the Client Control that the script is attached to is destroyed.
- Also called by the Global Script when the stage ends; however, there is no guarantee that the function will execute before the client disconnects.
- Ignored by Module scripts.