Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I send all players to a new server?

I often have to close servers in game to test new stuff. It would be far more efficient if a function existed that allowed could send everyone to a new server. I know I can do this with the ReserveServer and TeleportToPrivateServer functions, though this means other people can't join the new server. I can simply teleport everyone at once with the Teleport function, but this splits everyone up. Anyone have any good solutions to this?

1 answer

✓ Accepted answer

With those requirements, I can only think of one solution, and that's to manage servers yourself (and I'm not sure how feasible this is, though I've been attempting to design such a system). With that, you could put people into those private servers at will, using the startup place as a "teleportation hub" - people would go there only to be teleported to a private server.

Ignoring the idea of teleporting to another server, another solution that I have successfully implemented in the past (though not on any public games) is to send your servers "update packages". The basic idea is for you to publish a model and then manually store a value in a datastore that all the servers are watching; the value you store refers to the model. The servers download the model and then can update themselves without closing.

Instead of a model, you could just transmit "new server is live" to the datastore (with a version key). All servers should monitor that key; when it changes to a value that is not the same as the current server version (which you could store in a script), they should shut themselves down immediately. (If the servers don't all shut themselves down at the same time, people will re-enter servers that are about to shut down, which would be a mess. If you instead want to wait for games to finish, you might change this to be "servers close in 2 minutes" or something.)

1 comment

0

that makes sense. thanks!

This discussion is preserved as it was. New answers, comments, and votes are closed.