WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 30 Jul 2011 05:53 PM |
Okay let's say I have something like this:
for i, v(game:Players:GetPlayers()) do if v.Name == Player then v.Character:remove() end end
Does that remove EVERYONE, or does that remove only the Player named Player? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 05:57 PM |
| It removes no one because it would error on the first line :3 |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 30 Jul 2011 05:58 PM |
Oops. Made a tiny little mistake.
for i, v in pairs(game:Players:GetPlayers()) do if v.Name == Player then v.Character:remove() end end
There.
Will this remove everyone's character, or just the one named "Player" |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 05:58 PM |
| It removes no one, because it will still error on the first line :3 |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 05:59 PM |
Well, if you used the pairs function it'd remove only Player, but since you didn't... Oh, and yes, the ifrst line errors.
for i, v in pairs(game:Players:GetPlayers()) do if v.Name == Player then v.Character:remove() end end
|
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 05:59 PM |
@electric
Still errors on the first line :3 |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 05:59 PM |
Wait, another error. O_O
"game:Players"? Lol.
for i, v in pairs(game.Players:GetPlayers()) do if v.Name == Player then v.Character:remove() end end
|
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:00 PM |
| Yeah, I didn't even see the colon there. xP |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:00 PM |
Agh, I keep spotting errors.
for i, v in pairs(game.Players:GetPlayers()) do if v.Name == Z"Player" then v.Character:remove() end end
--floodcheck--
|
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:01 PM |
@electric
Better. That will only delete the person named Player, if you ever choose to define that variable :3 |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 30 Jul 2011 06:01 PM |
You guys still understand my question, right?
It removes only the Player's character, okay. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2011 06:01 PM |
| Ignore the Z there, that was a typo. ._. |
|
|
| Report Abuse |
|
|