Whenever I try to run game.OnClose() and shutdown all the server instances, the GUI does not appear nor does a 30 second wait happen like it supposed to?

local Players = game:GetService("Players")

game.OnClose = function()
	for _,player in pairs(Players:GetPlayers()) do
		local gui = game.Players[player.Name].StarterGui.MainUI
		local shutdownFrame = gui.ShutdownNotice
		shutdownFrame.Visible = true
	end
end

2 comments

0

I just noticed I messed up, give me a second.

0

Still not working, updating so that I can fix the issue that I did in the script.