SoftShutdown2 — Shutdown all servers with peace of mind!

SoftShutdown2 is my own implementation of Merely’s ‘Soft Shutdown Script’. Credit to @Merely for the inspiration!

Current release: v1.21, June. 27, 2023

EDIT Nov/07/2023

SoftShutdown2 is currently broken for servers with more than one user. If you find this resource useful, please support a fix for this problem here.


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

The purpose of a soft shutdown script is to teleport a server’s players into a new server in the same place under your experience when the server gets shut down (manually in this case). This is so you can push essential updates out to your community without needing them to rejoin manually, as well as reducing the amount of players lost during migration.

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 experience.

Before implementation in my own experience, I was losing almost half of my players each shutdown for my updates. After the installation of this module, I am successfully able to keep up to 90% of my players.

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

  • Group teleporting
    Keep a server together by teleporting all of them together. No more losing potential friends & revenue due to urgent developer shutdowns.

  • Lightweight & Performant
    With less than 100 lines, this resource only does what it’s meant for, and quickly. Get your players into new servers now, not later.

  • Up-to-date
    SoftShutdown2 is clean, easy to tweak, and only uses the latest functions as well as the new TeleportAsync API to insure longevity and forwards-compatibility.

  • Minimal interruptions
    Reserve character positions in the world, so when they’re teleported back, they don’t have to walk back to where they were. Makes sense for simulators, social hangouts, and more.

  • Additional teleport screen
    Let your users immediately know that a new update is live right as you press the button, and that they’re being teleported to a brand new server.

Great! How do I get started?

Easy! Grab SoftShutdown2 from either the Roblox model or the GitHub gist, and insert it into ServerScriptService.

  • Make sure to clone this script into every place under your experience. I highly recommend converting it to a package to make updating it in the future easier!

  • If you want to reserve character positions, make sure to enable it inside the script, by setting “ReserveCharacterPosition” at the top to true. I understand this won’t integrate nicely in every experience, so it’s disabled by default.

Want more? Here’s the gui showcased in the demo, drag it under ReplicatedFirst in any place that has the SoftShutdown2 script, and it should work seamlessly!


Still not convinced? Watch the demo!

I hope you’re able to find this resource useful. Please report any issues you’re having as a reply to this thread and I’ll get to you when I can!

376 Likes

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

11 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?

4 Likes

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!

7 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!

26 Likes

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

4 Likes

Great script! Very useful for large games with a lot of concurrent players, works good with big and small servers.

1 Like

I noticed you did
xpcall(function() compared to
local result, errormsg = pcall(function()

What’s the difference if you don’t mind me asking?

1 Like

I’d love for this to be implemented into my game, however, I seem to be running into a brick wall and it will for some reason will not work. Are you or someone else able to provide an uncopylocked place with the SoftShutdown2 script functioning so I can see what I’m doing wrong? Thanks!

1 Like

Hey @anon63380570, What seems to be the issue your running into?
May you provide clips or further information on your situation.

1 Like

I put the script in ServerScriptService, created a new place in the Asset Manager, named it ‘SoftShutdown’, copied the ID of that new place, and put it into the script as stated. I went into the SoftShutdown place in the Asset Manager and put the UI provided by the creator. I then made it public so that I could test it, I shut down the server and I got the default Roblox shutdown UI, with the ‘Leave’ and ‘Reconnect’ options. I’m very unsure where I messed up the implementation, as I felt I followed the instructions pretty well.

1 Like

You have to put the MainScript in both games.

My SoftShutdown Game

image

My Main Game

image

Notes

Your version will be a bit different.
The main script will be in ServerScriptService Directly, I’ve altered mine to be inside a Module so It fits the rest of my game

In the main game, the ID inside the script needs to be the ID of your SoftShutdown Game
In the SoftShutdown Game, it needs to be the EXACT Id, If the SoftShutdown Id is the same as the one in the script it will detect the SoftShutdown game and send everyone back into the server with the users they had before.

If you have any further questions feel free to ask.

1 Like

Just to clarify, I should be getting the IDs from the Asset Manager like this?
image

Also, In the SoftShutdown game, can you clarify what you mean by the Exact ID? Is that the ID of the game found here?
image

Thanks for your help by the way, I’m a little new when it comes to this whole Roblox dev thing. I’ve been trying my best.

1 Like

Both the SoftShutdown and MainGame must share the same ID. In this case, the script will have the SoftShutdown Games ID for both games.

1 Like

Im hitting a brick wall, so I place the scripts in ServerScript on each place
Softshutdown server id is placed in the main game and same thing in the second place.
I shutdown the servers and the game gives me a an error instant

1 Like

What is the error message? Did you maybe alter the script and messed up something.

2 Likes

Hey, what’s the error that you’re receiving?

2 Likes

Nothing to alternate the script
Error code I am getting to shutdown the servers is Error Code 274 :

1 Like

How would I go about implementing a ui countdown before the players are teleported to the SoftShutdown universe?

2 Likes

very useful for my game , I am going to bookmark it.

1 Like