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

How do i send players into a another game, when the all servers of the game shuts down?

Hello, I'm trying to make a Bloxburg simular game. I wanna do it, when i shut down the game, all players, that is playing the game, teleports to a mainteance lobby. Then a few seconds later, they teleport into the game again. I can't script good so i need help.

2 answers

You can make a LocalScript detect when the player gets disconnected from the game, and then teleport them to the maintenance lobby using TeleportService.

local id = 123 --replace with the place id of your maintenance game
game.Players.PlayerRemoving:Connect(function(plr)
    if plr == game.Players.LocalPlayer then
        game:GetService("TeleportService"):Teleport(id)
    end
end)

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