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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 26 May 2009 |
| Total Posts: 545 |
|
|
| 11 Aug 2011 01:04 PM |
| Nope. Nice try though :D thanks |
|
|
| Report Abuse |
|
|
|
| 11 Aug 2011 01:08 PM |
| Well, what happened when you tried it? :/ |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 11 Aug 2011 01:13 PM |
| @bag - That works, but it's so inefficient... :\ |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
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
|
  |
| 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 |
|
|