Experiences in games are key to success, and I do not want younger players to get confused by a kick shutdown. Some don’t know that they can go back to the play button, they probably think they’re banned from the game.
I want to improve experiences for those younger players. I am looking towards doing something like RHS shutdowns. What RHS does is they put a big GUI that covers the whole game screen and says “Updating the Game, please wait” and you don’t have to go back to the play button, you’re back in a new server that has been updated during the invisible shutdown.
I am looking towards doing something like that. Does anyone have any scripts that does something similar that they are willing to pass down?
You can use Merely’s soft shutdown script to do this pretty smoothly. It basically teleports you to another place until the servers have shutdown and then teleports you back
You could also have a datastore linked to your game version, once a new server gets started with a higher version than what the other servers are running at, it’ll show a shutdown countdown due to a game update, and after that the server will shut down, (they would still need to manually rejoin) PlaceVersion
When I shutdown the servers on Place1, the players within those servers are all teleported to the Menu, and when they load into the Menu, it loads a notification saying “Sorry, the server you were in was shutdown for an update!”
You can do all this with game.OnClose() function. It fires when the server is shutting down, and you can allow the server to do stuff for up to 30 seconds before the server automatically shuts off (pretty sure this is still accurate, haven’t looked at any documentation recently).
OnClose is deprecated, BindToClose should be used instead. I do the same as you, slightly different to Merel’s as he uses the same place as a temporary lobby, but follows the same concept.
Using game:BindToClose, when a shutdown is detected, I teleport all players to the Teleport Hub place. Then the Teleport Hub holds each player there for ~30 seconds (so that there’s no chance of them rejoining into a server that’s still trying to shut down) and then teleports them back into the main game. I haven’t tried Merely’s script but that should work well too.
One other little thing to note - I’ve found that on rare occasions, a server can just randomly shut down for no apparent reason, and players would mistakenly think it was for a game update. So I’ve changed my messaging to a generic “The server has experienced a shutdown. You will be teleported back to a new server in a few moments!” to cover any type of server shutdown and prevent confusion.