How do you shutdown without having players go back and press play?

I have a quick question…

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?

Thanks!

3 Likes

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

15 Likes

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

3 Likes

That doesn’t solve the issue at all though? It’s also a lot more work for no benefit

3 Likes

What I have my game do is I have:

  • Menu
  • Place1

(Both within the same “game”)

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.

2 Likes

Ah thank you. Haven’t checked the documentation in a long time. Thanks for letting me know! :smiley:

This could work well, if you haven’t seen this yet.

Yeah, in RHS I just have 2 different places:

image

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.

19 Likes

Thank you, cindering. That really helps me out with my game.

Seeing as this topic is now solved, please mark his answer as solved so other people don’t get confused and come with more answers.