KeithRBX
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 400 |
|
|
| 28 Jul 2014 01:44 PM |
for i = 301, 0, -1 do if not game.Players:FindFirstChild(sniper) then info.Value = "The Sniper has left!" wait(3) break
this is inside another loop with a lot of other code
it should change info's value to the sniper has left ONLY if the sniper has left
there's something wrong, I don't know what
it doesn't matter what I put in the if clause, even if I do
if game.Players[sniper] then info.Value = "The Sniper has left!"
what's wrong? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 28 Jul 2014 01:47 PM |
| sniper is a string, right? |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 Jul 2014 01:48 PM |
| where did you define the varible sniper |
|
|
| Report Abuse |
|
|
Falq
|
  |
| Joined: 31 Dec 2007 |
| Total Posts: 2521 |
|
|
| 28 Jul 2014 03:28 PM |
hi i'm the OP, just got a 14 day ban
anyway
First I insert every player into a table and randomly pick from the table (so I can give them extra chances to be picked, not just directly picking).
Changing it to sniper.Name didn't help either. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 Jul 2014 03:42 PM |
i would have sniper.Value
but how r u banned when i can see ur pfile |
|
|
| Report Abuse |
|
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 28 Jul 2014 03:44 PM |
| original poster (guy who made thread) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
Falq
|
  |
| Joined: 31 Dec 2007 |
| Total Posts: 2521 |
|
|
| 28 Jul 2014 03:47 PM |
"but how r u banned when i can see ur pfile"
well i logged in and it says "U R 14 DAY BANNDIED"
I don't know why this won't work, I print(game.Players:FindFirstChild(sniper)) right before the if statement and after the start of the for loop
true
what the hell |
|
|
| Report Abuse |
|
|
Falq
|
  |
| Joined: 31 Dec 2007 |
| Total Posts: 2521 |
|
|
| 28 Jul 2014 03:58 PM |
i dont have my file open but here's how i think sniper's declared
local players = {}
for i, v in players(game.Players:GetPlayers()) do table.insert(players, v) if v:IsInGroup(1111) then table.insert(players, v) end end
local sniper = players[math.random(#players)] |
|
|
| Report Abuse |
|
|
| |
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
| |
|
Falq
|
  |
| Joined: 31 Dec 2007 |
| Total Posts: 2521 |
|
|
| 28 Jul 2014 04:43 PM |
| yes it is but sniper.Name isn't and that won't work either |
|
|
| Report Abuse |
|
|
Falq
|
  |
| Joined: 31 Dec 2007 |
| Total Posts: 2521 |
|
|
| 28 Jul 2014 06:10 PM |
apparently i just beat scripting helpers
crap |
|
|
| Report Abuse |
|
|