Skip to main content

Finishing Your Script

Manually Destroying The Interface

Starlight:Destroy()

Will forcibly end all Starlight Activity in terms of Interface.

Setting Deactivation on Destruction

The window can be destroyed directly via the close control. But this only destroys the GUI, so your scripts will not be reverted.
To fix this, we can simply add functions to revert things to normal on the destroy.

Starlight:OnDestroy(function()
-- revert your functions/scripts here
end)