I made a BindToClose() script that checks if it’s either an update or shutdown by using the CloseReason parameter and it’s been kind of working.
game:BindToClose(function(reason)
if reason == Enum.CloseReason.DeveloperShutdown then
game.ReplicatedStorage.Remotes.ChatMakeSystemMessage:FireAllClients('<font color="#af0000">The game has been prompted to shutdown.</font>')
task.wait(5)
print("Shutdowning...")
elseif reason == Enum.CloseReason.DeveloperUpdate then
game.ReplicatedStorage.Remotes.ChatMakeSystemMessage:FireAllClients('The game is being updated, you will be migrated to a new server.')
task.wait(5)
print("Updating...")
end
end)
When I clicked on “Shutdown All Servers”, the game thinks it’s an update and rather decides to restart all servers instead of shutdowning them. Roblox released the ability to migrate to latest update back in 2020 which does the job as expected when I release a new version. However, “Shutdown All Servers” is supposed to do what it says, shutdown all servers.
I’m not sure if it’s a coding error with Roblox’s website and how it works or if it’s BindToClose()'s fault (or simply my own coding) but in anyway, how could I shutdown the servers?
I’ve also tried shutdowning the server individually aswell as setting the place to private and it shutdowns with no BindToClose function running.
Edit 1: Apparently, it’s “RobloxMaintenance” for both individual shutdowns and setting the place to Private which is odd.
Sorry if I got off-track, I’m just confused.