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
 

The ultra-killing spell

Previous Thread :: Next Thread 
link7002 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
11 Aug 2011 12:53 PM
Okay, not really. It's just a script that kkills everyone. But, I want it to kill everybody but me abnd my friend when I cast the spell

playas = game.Players:GetChildren()
for i = 1, #playas do
if playas[i].Character ~= nil then
playas[i].Character:BreakJoints()
end
end

I have no clue how to make it so thtat it doesnt kill me or my friend 'bagwan2345'. Help please? I wasn't sure if maybe you would use a 'else' or what. Thanks

P.S Roblox is beins.t.u.p.i.d and the computer told me I wasn't allowed to post this because I have apprently alreayd posted this question, or something witha similar format. SO I added another paragraph. lol
Report Abuse
link7002 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
11 Aug 2011 12:54 PM
Tupid? lol. Either I failed or roblox is really strict.
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
11 Aug 2011 12:57 PM
players = {link7002 = true, Player = true}


for i,v in pairs(game.Players:GetChildren()) do
if players[v.Name] then return end
v.Character:BreakJoints()
end
Report Abuse
link7002 is not online. link7002
Joined: 26 May 2009
Total Posts: 545
11 Aug 2011 01:04 PM
Nope. Nice try though :D thanks
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
11 Aug 2011 01:08 PM
Well, what happened when you tried it? :/
Report Abuse
bagwan12345 is not online. bagwan12345
Joined: 17 Dec 2009
Total Posts: 1498
11 Aug 2011 01:12 PM
playas = game.Players:GetChildren()
for i = 1, #playas do

if playas[i].Name ~= "link7002"
or playas[i].Name ~= "YOURFRIENDTROLOL" then

if playas[i].Character ~= nil then
playas[i].Character:BreakJoints()
end
end
end

I HALPED U :3
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
11 Aug 2011 01:13 PM
@bag - That works, but it's so inefficient... :\
Report Abuse
bagwan12345 is not online. bagwan12345
Joined: 17 Dec 2009
Total Posts: 1498
11 Aug 2011 01:22 PM
I know I know lol but I'm still pretty mediocre at scripting, and tbh sometimes when I try to be efficient, then the whole thing messes up lol
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
11 Aug 2011 01:26 PM
Oh, Lol. :P
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
11 Aug 2011 01:30 PM
playas = game.Players:GetChildren()
for i = 1, #playas do

if playas[i].Name ~= "link7002" then
if playas[i].Name ~= "bagwan2345" then
if playas[i].Character ~= nil then
playas[i].Character:BreakJoints()
end
end
end
end

Oh, and if you want to make it for SB's, you could always make it a function. You know, for your space and all.


playas = game.Players:GetChildren()
functon onTouch(hit)
for i = 1, #playas do

if playas[i].Name ~= "link7002" then
if playas[i].Name ~= "bagwan2345" then
if playas[i].Character ~= nil then
playas[i].Character:BreakJoints()
end
end
end
end
end

game.Workspace.bagwan12345.Torso.Touched:connect(onTouch)
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
11 Aug 2011 01:32 PM
Ehh, add a debounce..

db = true

playas = game.Players:GetChildren()
functon onTouch(hit)
if not db then return end
db = false
for i = 1, #playas do
if playas[i].Name ~= "link7002" then
if playas[i].Name ~= "bagwan2345" then
if playas[i].Character ~= nil then
playas[i].Character:BreakJoints()
wait(1)
db = true
end
end
end
end
end

game.Workspace.bagwan12345.Torso.Touched:connect(onTouch)
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