How do i create a Shutdown timer in game so the game shutdown auto sometimes to fix server
COMMUNITY QUESTION
Roblox: Game shutdowner Timer script?
1 answer
If this helps, please accept my answer. I am not sure if there is a way to shut a server down, I will just use kicking.
-- The scope below will loop through the service of "Players" and get all players. It then kicks all the players.
for i,Player in pairs(game.Players:GetPlayers()) do
Player:Kick('Game has shutdown') -- Kick uses a parameter of the message, you can change he message.
end
3 comments
0
This, or http://wiki.roblox.com/index.php?title=API:Class/DataModel/Shutdown&redirect=no if you want to do it manually.
0
Ah, never knew that, thanks!
0
@Programical According to that wiki document, it can't be used in scripts, and only the command bar can it be used.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You can just kick all the players.