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

What's the best way to shut down a server?

Hi, my game is a bit unstable so I'd like every server to shut down 6 hours after being created. What's the best way to do this?

1 answer

This question has already been asked by user, Merely. https://scriptinghelpers.org/questions/336/best-way-to-shutdown-a-server

But to answer your question on how to do it within 6 hours of server time:

local Locked = false

wait(21600)
Locked = true
for i,v in pairs(game.Players:GetChildren()) do
v:Kick()
end

game.Players.PlayerAdded:connect(function(plr)
if Locked == true then
plr:Kick()
end
end)

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