Shutting down all game servers from a script

So I’m trying to make a command where when it’s ran, it shuts down all game servers for updates and such, and it pops up a GUI on people’s screens saying “Game Update was published, restarting servers.”. How would I send that GUI and shut down all servers after like 5 seconds of that GUI showing up? I saw something with MessagingService or something like that, but it usually is buggy when I use it.

I think there is a public script in the tool box or as a plugin called soft shutdown. When you shutdown game servers from the website, it displays a GUI and moves them to a different game until the update is complete than teleports them back in.

2 Likes

I’m trying to make a script that can shut down the servers from in game, not the website, because this game has a lot of sub-places that would be hard to shutdown all at once. Could I loop through each place and shut it down or is there a more efficient way?

If you use the Shutdown button in Creations > Games it shutdowns all the servers in every place under that universe. You can just use BindToClose for your shutdown warning GUI

Please search before posting threads. This was just asked yesterday.

This is a different issue. I’m attempting to shut down / kick players from all servers on game, not just one. That thread is for just a single server, the current one.

1 Like

The relevance is in the sense that it has to do with shutting down servers from the Lua-side, which is not possible to do. There are soft shutdown scripts that attempt to interrupt the experience as little as possible, which can also be found through searching.

Communicating with instances can be done through MessagingService (I don’t know how it’s buggy for you but that’s a topic for a different thread) or by a synchronised system (e.g. posting the message whenever the timestamp of updated from GetProductInfo changes from a cached value).

pretty sure there’s a service that allows you to communicate across servers. if you use lua to kick everyone from every server (there’s a kick event), by default a server will end if there are no players in it, you dont necessarily need to use a shutdown event or something, but this is just a theory i’ve never tested something like this myself but after typing it here, i probably will

yeah now i remember, MessagingService | Roblox Creator Documentation is how servers communicate with each other

oops, its May 2021 right now but this post is from May 2020 my bad