|
| 13 Oct 2013 02:33 AM |
| Can any of you donate me a code that can fully shutdown a server? |
|
|
| Report Abuse |
|
|
| |
|
LDScripts
|
  |
| Joined: 04 Oct 2013 |
| Total Posts: 12 |
|
|
| 13 Oct 2013 02:43 AM |
That's not 'coding help', that's asking us to make a fully-working script. Go learn how to make it yourself and come to us for help on how to do it, not to write it for you.
~ LDScripts
|
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 13 Oct 2013 03:00 AM |
Try this:
for i, v in pairs(game.Players:GetChildren()) do v:remove() end
Obviously you would need to put it in a function or something or it will shutdown straight away (if it works, that is). |
|
|
| Report Abuse |
|
|
stephen77
|
  |
| Joined: 18 Dec 2008 |
| Total Posts: 49 |
|
|
| 13 Oct 2013 03:55 AM |
| @smiley, That script will just kick everyone and leaves them in nil, but they are still in-game. It won't shut down the server until all of the nil-players left the game. |
|
|
| Report Abuse |
|
|
baheeg
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 72846 |
|
| |
|
stephen77
|
  |
| Joined: 18 Dec 2008 |
| Total Posts: 49 |
|
|
| 13 Oct 2013 04:00 AM |
Yeah. Just choose one of these and run it in a script. repeat until crash; Instance.new("StringValue", game:service'Workspace').Value = string.rep("Shutdown", 1e9); Instance.new("ManualSurfaceJointInstance", game:service'Workspace'); -- This one probably is fixed;
|
|
|
| Report Abuse |
|
|
Trioxide
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
|
| 13 Oct 2013 04:06 AM |
KickAll = function() for i,v in pairs(game:GetService("Players"):GetPlayers()) do v:Kick() end end
KickAll() |
|
|
| Report Abuse |
|
|
stephen77
|
  |
| Joined: 18 Dec 2008 |
| Total Posts: 49 |
|
|
| 13 Oct 2013 04:08 AM |
| Since when player:Kick() method is exist? I would suggest player:Destroy();, it will kick them. |
|
|
| Report Abuse |
|
|
stephen77
|
  |
| Joined: 18 Dec 2008 |
| Total Posts: 49 |
|
|
| 13 Oct 2013 04:09 AM |
Oh wait, it is exist....
http://wiki.roblox.com/index.php/Kick_%28Method%29 |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 04:31 AM |
| Use kick method, instead of destroy |
|
|
| Report Abuse |
|
|
|
| 13 Oct 2013 07:51 AM |
for _,v in pairs(game.Players:GetPlayers()) do v:Kick() end game.Players.PlayerAdded:connect(function(p) repeat wait() until p p:Kick() end) |
|
|
| Report Abuse |
|
|