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 » Scripting Helpers
Home Search
 

Re: RE: CODING HELP!

Previous Thread :: Next Thread 
QuarterTerm is not online. QuarterTerm
Joined: 29 Jun 2013
Total Posts: 6795
13 Oct 2013 02:33 AM
Can any of you donate me a code that can fully shutdown a server?
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
13 Oct 2013 02:37 AM
No
Report Abuse
LDScripts is not online. 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 is not online. 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 is not online. 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 is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
13 Oct 2013 03:56 AM
[ Content Deleted ]
Report Abuse
stephen77 is not online. 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 is not online. 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 is not online. 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 is not online. 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
Project2015 is not online. Project2015
Joined: 11 Sep 2013
Total Posts: 384
13 Oct 2013 04:31 AM
Use kick method, instead of destroy
Report Abuse
AdvorsusDuo is not online. AdvorsusDuo
Joined: 17 May 2012
Total Posts: 5265
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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