SoftShutdown2 — Shutdown all servers with peace of mind!

SoftShutdown2 is my own implementation of Merely’s ‘Soft Shutdown Script’.


What is a shutdown script, and what does it do?

The purpose of a soft shutdown script is to teleport all players in a server to a place in the game when a developer shuts down all servers. The players will then wait a mere few seconds to make sure that Roblox prepares a new server to avoid the risk of getting an outdated one, then the server will teleport all the players together back to the original place in an updated server.

By default Roblox doesn’t offer this, but with our own implementation we can make sure we get most of our players back into the game for the best player and developer experience.

Before implementation in my own game, I was losing ~50% of my players each shutdown for my updates. After the installation of this module and shutting down a few times, I have successfully kept 90% of my players. That’s almost hardly any loss!


What does yours offer that Merely’s or any existing ones don’t?

  • Group Teleporting: This should keep all players in the server together through the transporting process so once it’s done everyone who were originally in the previous server would all be in the new server.

  • Better Performance: Teleports to a separate place in the game to avoid having
    to load through assets in the original place for better network performance… that is as long as you make sure the place isn’t filled with 90,000 parts! Here’s a copy of my place used for example: SoftShutdownPlace.rbxl (31.8 KB)

  • Up-to-date: My soft shutdown script is very clean, easy to use, and uses the latest functions and the new TeleportAsync API to insure longevity and forwards-compatibility.

  • Teleport GUI: I also offer a customizable GUI to place under the SoftShutdown place in your game to let your players know what’s going on.


Great! Now how do I use it?

Take the free model or the GitHub code, insert it into ServerScriptService, replace the variable SoftShutdownPlace with the empty place’s PlaceId under your game, and you’re all set!

image
Remember to create a separate place for waiting!

I also made a client-sided GUI if you’d wanna try it out:
https://www.roblox.com/library/6655399832/SoftShutdownGui


Still not convinced? Watch a demo!


POLL: Would you find it useful if I add an optional method of teleporting the player back to where they were in the place when they teleport back for minimum interruption?

  • Yes
  • No

0 voters

I hope you’re able to find this resource useful. If you have any problems that you haven’t been able to figure out or think this resource needs something, please let me know!

Credit to @Merely for the inspiration!

48 Likes

Looks great! I can’t believe this topic hasn’t blown up in views yet!

4 Likes

Looks very great! Excited to test this out.

One question though. With Merely’s SoftShutdown script, it would save the data (if there was any) before the player got teleported. Is that something that is supported here or do we need to integrate it ourself?

1 Like

There’s no need to save data in this script. As long as you have data in your game which is saved when the player leaves, and there’s an active BindToClose to give the closing server time to save player data, then you should be all set!

3 Likes

Great module! Only thing I’d want to suggest is that the below code snippet would be the perfect place to use xpcall
image
You can condense this to

xpcall(function()
	local TeleportResult = TeleportService:TeleportAsync(
			TeleportData.ReturnPlaceId,
			Players:GetPlayers(),
			TeleportOptions
		)
	end, warn)

I don’t mean this as criticism because there’s absolutely nothing wrong with what you did, I mean this as a friendly time saving tip. Keep up the good work!

5 Likes

Thanks for this! I’ll be using this in my game. Amazing work! :smiley:

1 Like