Yes, but even with your implementation you’re teleporting back into normal servers which causes the same issue:
The wait is arbitrary so there’s no guarantee they won’t be teleported back into an old server, right? Especially if another BindToClose keeps it open for 30 seconds.
Wouldn’t illuzive have not encountered the issue if that weren’t the case? He’s not the first person I’ve heard of experiencing that issue, so I don’t think it was specific to his implementation.
I’ve used this shutdown script multiple times over the past two weeks on 250+ servers at a time with no issues. The only minor issue I’ve encountered is that upon re-joining the new servers, a small number (1/100) of players will have a couple textures fail to load, probably due to the massive requests for data from the shutdown
So… I just had an “oh essward” moment in Ultimate Boxing. Appears I had Free For All terminate after 1 second instead of 2 minutes. Soft shutdown worked for the emergency fix, with all 8 players arriving back in the same server.
Having this open source is pretty cool, as it allows people (like me) to innovate. With the original implementation, it killed off plans for tournaments in Ultimate Boxing as all reserved servers would kick players out instantly. To solve this, I have the teleporting for the intermediate place done on the client instead of the server. I also include a decent looking screen instead of the deprecated “Message” instance. Everything is also given as one package and reparented to make inserting easier.
TeleportService has limits on the places a player can be teleported to. A player can only be teleported between places in the same game or to the Start Place of another game
This is tragic. No wonder my concurrents dropped way lower than normal tonight after I updated. Soft shutdown lets us update more frequently without fear of losing players - I think it’s pretty important that the functionality stays around.
It doesn’t use VIP servers, it uses Resverved servers. It does this so that it’s guaranteed you’re teleported to a new server - not one that is shutting down - and remain with the same players.
I made a very simple soft shutdown implementation, it lacks an user interface.
Localscript in ReplicatedFirst
local teleportService = game:GetService("TeleportService")
game:GetService("NetworkClient").DescendantRemoving:Connect(function(replicator) --client loses connection
if replicator:IsA("NetworkReplicator") then
while true do
pcall(teleportService.Teleport, teleportService, game.PlaceId)
wait(1)
end
end
end)
When you’re shutting down the server:
Script in ServerScriptStorage
local players = game:GetService("Players")
local function shutdown()
for _, player in pairs(players:GetPlayers()) do
player.Parent = nil --triggers shutdown, but don't disconnect players just yet
end
end