|
| 20 Apr 2014 08:24 PM |
| I need a simple script that kills all players at once. |
|
|
| Report Abuse |
|
|
Vexeris
|
  |
| Joined: 03 Apr 2014 |
| Total Posts: 468 |
|
| |
|
Azirux
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 232 |
|
|
| 20 Apr 2014 08:25 PM |
for i,v in pairs(game.Players:GetChildren()) do v.Character:BreakJoints() wait() end |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 20 Apr 2014 08:25 PM |
| for index, value in next, Game.Players:GetPlayers() do value.Charactaer:BreakJoints() end |
|
|
| Report Abuse |
|
|
Azirux
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 232 |
|
|
| 20 Apr 2014 08:25 PM |
| What's the point of next? I never got that. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2014 08:25 PM |
for _,plyr in pairs(game.Players:GetPlayers()) do v.Character:BreakJoints() end
i'm asian |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 20 Apr 2014 08:26 PM |
| next is more efficient, and pairs returns next anyway. So you are using next whether you know it or not |
|
|
| Report Abuse |
|
|
Azirux
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 232 |
|
|
| 20 Apr 2014 08:27 PM |
| So... there is no point .-. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 20 Apr 2014 08:28 PM |
| What's the point of using pairs when you can use a numeric for in this case? which is like 2x faster |
|
|
| Report Abuse |
|
|
Azirux
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 232 |
|
|
| 20 Apr 2014 08:29 PM |
| It's more personally convenient c: |
|
|
| Report Abuse |
|
|
kubuto2
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 1275 |
|
|
| 20 Apr 2014 08:29 PM |
for _,v in pairs(game.Players:Players()) do v:LoadCharacter() end
--No one can beat it. |
|
|
| Report Abuse |
|
|
|
| 20 Apr 2014 08:30 PM |
| thank you! Just what I needed. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 20 Apr 2014 08:34 PM |
| kub, you are using a deprecated method. So we all beat it |
|
|
| Report Abuse |
|
|
kubuto2
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 1275 |
|
|
| 20 Apr 2014 08:36 PM |
It is not deprecated!
But, it should only be used in a script. |
|
|
| Report Abuse |
|
|
Azirux
|
  |
| Joined: 18 Feb 2014 |
| Total Posts: 232 |
|
|
| 20 Apr 2014 08:36 PM |
| LoadCharacter is deprecated? When .3. |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 20 Apr 2014 09:16 PM |
| next iterates through a table in numeric order where pairs randomly iterates through tables |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Apr 2014 12:39 AM |
| No, the players method is deprecated, not LoadCharacter... |
|
|
| Report Abuse |
|
|
Vexedly
|
  |
| Joined: 15 Sep 2006 |
| Total Posts: 7011 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
Vexedly
|
  |
| Joined: 15 Sep 2006 |
| Total Posts: 7011 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Apr 2014 12:49 AM |
| v.Character.Humanoid.Health = 0 |
|
|
| Report Abuse |
|
|
Vexedly
|
  |
| Joined: 15 Sep 2006 |
| Total Posts: 7011 |
|
| |
|
|
| 21 Apr 2014 02:44 AM |
a = game.Players:GetChildren() for i = 1, #a do if a[1]:IsA('Player') then a.Character.Humanoid.Health = 0 |
|
|
| Report Abuse |
|
|
transIate
|
  |
| Joined: 20 Jun 2013 |
| Total Posts: 2699 |
|
|
| 21 Apr 2014 04:16 AM |
w=1; for i,v in next,game.Players:children''do pcall(function() v.Character:breakJoints''; wait(w); v:LoadCharacter()end)wait(w)end; |
|
|
| Report Abuse |
|
|
|
| 21 Apr 2014 04:21 AM |
Simply add this:
game.Workspace.Terrain:remove()
---For personal servers only :D
|
|
|
| Report Abuse |
|
|