Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My game.OnClose() won't work?

I have this script in the ServerScriptService and it throws an error, anyone know how to fix or why it throws an error?

game.OnClose:connect(function()
	wait(20)
end)

1 answer

You can learn more about this on the ROBLOX Wiki, But the layout on the ROBLOX Wiki has:

game.OnClose = function()--I think this is How you lay it out.
	print 'Closing, waiting'
	wait(3)
	print 'Done'
end

1 comment

0

It work! Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.