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.
COMMUNITY QUESTION
How do i send players into a another game, when the all servers of the game shuts down?
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)
Merely wrote a script that does exactly what you want: https://devforum.roblox.com/t/soft-shutdown-script/47588
Hope this helped
This discussion is preserved as it was. New answers, comments, and votes are closed.
