not running script because past shutdown deadline I've checked everything and it does not work. Help...
Not running script because past shutdown deadline? help
2 answers
The error usually occurs when you, for some reason have an yielding code within
game:BindToClose()
method, and surpasses the time limit.
The limit of anything running past the server closing is 30 seconds, therefore you are required to finish off anything (usually a data saving) within it. Try checking through your scripts to see if anything is yielding, and get rid of it if so. Otherwise you will have to come up with better method of doing stuff, so it doesn't take up over 30 secs.
Source: https://developer.roblox.com/en-us/api-reference/function/DataModel/BindToClose
The game shuts down before the script runs. A way you can prevent the game from closing before the script executes is to use game:BindToClose() and BindableEvents (BindableEvents are events that fire from a server to a server).
local BindableEvent = Instance.new('BindableEvent')
-- Code to stop the game from closing until the script finishes.
game:BindToClose(function()
BindableEvent.Event:Wait() -- Won't let the game shut down until the BindableEvent fires.
end)
Whenever you want the game to closed after the script is finished, simply fire the BindableEvent like so:
BindableEvent:Fire()
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
can you give us some more infomation?