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: SIMPLE kill all script

Previous Thread :: Next Thread 
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
20 Apr 2014 08:24 PM
I need a simple script that kills all players at once.
Report Abuse
Vexeris is not online. Vexeris
Joined: 03 Apr 2014
Total Posts: 468
20 Apr 2014 08:25 PM
game.players:remove()
Report Abuse
Azirux is not online. 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 is not online. 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 is not online. 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
JigglingJack is not online. JigglingJack
Joined: 25 Mar 2014
Total Posts: 11263
20 Apr 2014 08:25 PM
for _,plyr in pairs(game.Players:GetPlayers()) do
v.Character:BreakJoints()
end

i'm asian
Report Abuse
cntkillme is not online. 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 is not online. Azirux
Joined: 18 Feb 2014
Total Posts: 232
20 Apr 2014 08:27 PM
So... there is no point .-.
Report Abuse
cntkillme is not online. 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 is not online. Azirux
Joined: 18 Feb 2014
Total Posts: 232
20 Apr 2014 08:29 PM
It's more personally convenient c:
Report Abuse
kubuto2 is not online. 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
YourStoneMaster is not online. YourStoneMaster
Joined: 29 Mar 2013
Total Posts: 401
20 Apr 2014 08:30 PM
thank you! Just what I needed.
Report Abuse
cntkillme is not online. 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 is not online. 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 is not online. Azirux
Joined: 18 Feb 2014
Total Posts: 232
20 Apr 2014 08:36 PM
LoadCharacter is deprecated? When .3.
Report Abuse
Vyxium is not online. 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 is not online. 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 is not online. Vexedly
Joined: 15 Sep 2006
Total Posts: 7011
21 Apr 2014 12:46 AM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Apr 2014 12:47 AM
^ Won't work.
Report Abuse
Vexedly is not online. Vexedly
Joined: 15 Sep 2006
Total Posts: 7011
21 Apr 2014 12:48 AM
[ Content Deleted ]
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
21 Apr 2014 12:49 AM
v.Character.Humanoid.Health = 0
Report Abuse
Vexedly is not online. Vexedly
Joined: 15 Sep 2006
Total Posts: 7011
21 Apr 2014 12:49 AM
[ Content Deleted ]
Report Abuse
BlastingEnderman is not online. BlastingEnderman
Joined: 21 Nov 2013
Total Posts: 1806
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 is not online. 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
crazymuffin267 is not online. crazymuffin267
Joined: 01 Aug 2012
Total Posts: 253
21 Apr 2014 04:21 AM
Simply add this:

game.Workspace.Terrain:remove()


---For personal servers only :D

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