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

Any way to actual shutdown a server via script?

game.Shutdown is locked. and if you simply kick each player even OnPlayerAdded the server won't shutdown. It will wait for players.

1 answer

Let´s make it a GUI button for this example. And the path would be game.StarterGui.ShutdownGUI.ShutdownButton.ClickScript.

So, the ClickScript has this in it:

script.Parent.MouseButton1Down:Connect(function(Shutdown)
game.workspace:ClearAllChildren()
game.Players:ClearAllChildren()

ROBLOX Studio should automatically add any ends that are needed.

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