15

# Best way to shutdown a server? [closed]

Merely 2117
7 years ago

This question has been solved by the original poster.

In the past I have used Instance.new("ManualSurfaceJointInstance") from a server script, but it still takes a little bit of time for the old server to die out. Is there a faster way? Last time I checked, RequestShutdown didn't work.

5
That method is indeed the best way that is available to us right now. User#11893 186 — 7y

### Locked by Thewsomeguy and AmericanStripes

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

1
Axstin 55
7 years ago

I think disconnecting all clients that are connected will shutdown the server. Correct me if I'm wrong.

Player::Kick disconnects a client from the server, causing the player to see a "The game has shut down" message.

for i, v in next, game:GetService"Players":GetPlayers() do
v:Kick()
end


Hope this helps.

0

You could always just remove all the players in the server.

for _,v in pairs(game.Players:GetPlayers()) do
v:Kick(); --This or
v:Destroy();
shutdown = true
end

if shutdown then
plr:Kick();
plr:Destroy();
end
end

1
Players can simply rejoin the server. I want to actually shut it down. Merely 2117 — 7y
0
Just have an auto-kick in the :PlayerAdded function. PiggyJingles 358 — 7y
0

Create a script for Shutdown, in that script give every player's character a LocalScript with this in it: I don't think there's a better solution than this to shutdown a server at the minute.

Instance.new("ManualSurfaceJointInstance", Character) -- Remember to define Character.

2
No. That has the same effect as kicking the player. Crashing the player is never a good idea. User#11893 186 — 7y
0

I have a simpler script.

for k,v in pairs(game.Players:GetPlayers()) do
v:Kick()
end

-2
The most common methods areInstance.new("ManualSurfaceJointInstance", workspace) and workspace:ClearAllChildren() + crash (while true do end), or simply just crashing.