generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Shutdown Game Script?

Previous Thread :: Next Thread 
DynamicalJoe is not online. DynamicalJoe
Joined: 09 Nov 2013
Total Posts: 192
27 Jul 2015 06:22 AM
Does anyone know how to create a script to shutdown the game / Crash
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
27 Jul 2015 06:24 AM
You can kick all the players. There is no official shutdown command.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
27 Jul 2015 06:57 AM
Here are some ways.

LocalScript:

local function Shutdown()
while true do end
end

Shutdown()

Another one, this time ServerScript:

local function Shutdown()
while true do end
end

Shutdown()

Yet another one, this is still ServerScript:

local function Shutdown()
for Player = 1, #game.Players:GetPlayers() do
game.Players:GetPlayers()[Player]:Kick("This game has shutdown.")
end
end

Shutdown()

There are some more, but these are most common, I think. :P
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
27 Jul 2015 07:38 AM
local kick = function(plr)
plr:Kick()
end
local players = game:GetService'Players'
players.PlayerAdded:connect(kick)
for _,plr in next, players:GetPlayers() do
kick(plr)
end
Report Abuse
DynamicalJoe is not online. DynamicalJoe
Joined: 09 Nov 2013
Total Posts: 192
27 Jul 2015 11:08 AM
U proved Cody Wrong, Thanks.
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
27 Jul 2015 11:10 AM
for i, v in next, game:Players:GetPlayers() do
v:Kick()
end
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
27 Jul 2015 11:13 AM
@Dark Thank you for providing the perfect and cleanest example that I would have otherwise typed out. Thank you.


"Talk is cheap. Show me the code." - Linus Torvalds
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
27 Jul 2015 11:14 AM
No one mentioned a 'crash' except for me. I win. :P
I did both.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
27 Jul 2015 11:24 AM
Dark's version is flawed as a player could join in the short time before the server closes from lack of players.

Also, this is 2015, there is no reason to crash players...
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
27 Jul 2015 11:26 AM
@power, you cannot crash plrs.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
27 Jul 2015 11:34 AM
while true do end

Player:Destroy()

But you aren't allowed to crash players, it's against the rules of ROBLOX.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
DynamicalJoe is not online. DynamicalJoe
Joined: 09 Nov 2013
Total Posts: 192
27 Jul 2015 11:58 AM
Dark, Nice clean one, I should use that instead.
Report Abuse
texastyaust is not online. texastyaust
Joined: 08 Feb 2009
Total Posts: 2735
27 Jul 2015 12:00 PM
not sure if it works anymore but game.Lighting:destroy() was nice.
Report Abuse
DynamicalJoe is not online. DynamicalJoe
Joined: 09 Nov 2013
Total Posts: 192
27 Jul 2015 12:02 PM
@ty

Can you please reference that to the TOS page? pls

Thx ;3
Report Abuse
DynamicalJoe is not online. DynamicalJoe
Joined: 09 Nov 2013
Total Posts: 192
27 Jul 2015 12:05 PM
@texastyaust

That no longer works, Output just says its locked.
Report Abuse
Darkenus is not online. Darkenus
Joined: 17 Jul 2014
Total Posts: 1997
27 Jul 2015 09:08 PM
A simple idiotic mistake was discovered:

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


Before:

game:Players:GetPlayers()

After:

game.Players:GetPlayers()


Simple mistakes are so annoying! ;D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image