|
| 29 Apr 2015 06:15 PM |
i tried a couple but they don't work
i need an adequate signature |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 06:24 PM |
kick all players
and maybe kick every player that joins |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 06:24 PM |
b
i need an adequate signature |
|
|
| Report Abuse |
|
|
025110
|
  |
| Joined: 23 Nov 2012 |
| Total Posts: 57661 |
|
|
| 29 Apr 2015 06:25 PM |
for i,v in pairs(game.Players:GetChildren()) do v:Kick() end |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 06:31 PM |
| Kicking the players could work, or you could just clear all children for an easy one line code :) |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 06:36 PM |
@cody ClearAllChildren does not disconnect the client.
for i,v in next,game.Players:GetPlayers() do v:Kick() end |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 06:43 PM |
ok thanks, i tested it a couple of times and it worked :)
i need an adequate signature |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 06:59 PM |
Or you could crash it.
repeat print 'SlowingGame' print 'Crashing' until nil
Nothing is impossible, the word itself says 'Im possible' |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 07:03 PM |
@Summer That will not slow the server at all. The script will simply crash. |
|
|
| Report Abuse |
|
|
|
| 29 Apr 2015 07:04 PM |
Ah, ok, thanks.
Nothing is impossible, the word itself says 'Im possible' |
|
|
| Report Abuse |
|
|
Froast
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 3134 |
|
|
| 29 Apr 2015 07:42 PM |
local kick = function(plr) plr:Kick() end
for _,plr in next, game.Players:GetPlayers() do kick(plr) end game.Players.PlayerAdded:connect(kick) |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2015 11:04 PM |
@froast more work than needed @above Never said it had to be efficient |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 30 Apr 2015 11:43 PM |
| The server might not shut down just by kicking everyone, because what if someone is joining while you kick ro whatever |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 30 Apr 2015 11:56 PM |
local isServerShutDown = false
for i, v in pairs(game.Players:GetPlayers()) do v:Kick() end
isServerShutDown = true
game.Players.PlayerAdded:connect(function(plr) if isServerShutDown then plr:Kick() end end) |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 01 May 2015 12:02 AM |
eh well actually
local isServerShutDown = false
function shutDown(playersToKick) for i, v in pairs(playersToKick) do v:Kick() end isServerShutDown = true end
-- whenever you want to shut down the server, call that function
shutDown(game.Players:GetPlayers())
-- and to account for new players joining after the server is cleared out, add this playeradded function
function plrAdded(plr) if isServerShutDown then plr:Kick() end end
game.Players.PlayerAdded:connect(plrAdded)
|
|
|
| Report Abuse |
|
|
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 01 May 2015 12:03 AM |
kick all players, run a loop to kick anyone who enters after that, open a new thread with a loop that has no yield and you're golden
-=Robo=- |
|
|
| Report Abuse |
|
|
w8t
|
  |
| Joined: 01 Mar 2012 |
| Total Posts: 560 |
|
|
| 01 May 2015 04:31 AM |
Crash the server:
local s=Instance.new('Sound',workspace) s.SoundId='http://roblox.com/asset?id=83594623' s:Play() |
|
|
| Report Abuse |
|
|
Klocko
|
  |
| Joined: 10 May 2011 |
| Total Posts: 428 |
|
|
| 01 May 2015 04:39 AM |
| ^ That doesn't even crash the server, all it does is crash players on Windows. |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 04:54 AM |
function ShutItDown() game.OnClose = function() for i,v in pairs(game:GetChildren()) do if not v:IsA("Players") then for i,v in pairs(v:GetChildren()) do pcall(function() if not v == script then v:Destroy() end end) end end end end game.Players.PlayerAdded:connect(function(p) p:Kick() end) for i,v in pairs(game.Players:GetPlayers()) do v:Kick() end end
ShutItDown() --This should work :) |
|
|
| Report Abuse |
|
|
|
| 02 May 2015 07:27 PM |
@cnt Again, efficiency isn't what I was going for.
|
|
|
| Report Abuse |
|
|
|
| 02 May 2015 08:28 PM |
| while wait() do for i,v in next, game.Players:GetPlayers() do v:Kick() end end |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 02 May 2015 08:50 PM |
'Again, efficiency isn't what I was going for.' What are you talking about, I wasn't referring to you when I said what I said nor was I ever talking about efficiency silly. |
|
|
| Report Abuse |
|
|