KeithRBXJoin Date: 2014-07-25 Post Count: 400 |
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? |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
sniper is a string, right? |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
where did you define the varible sniper |
|
FalqJoin Date: 2007-12-31 Post Count: 2521 |
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. |
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
i would have sniper.Value
but how r u banned when i can see ur pfile |
|
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
original poster (guy who made thread) |
|
|
0_0Join Date: 2010-08-15 Post Count: 1197 |
Original Poster |
|
0_0Join Date: 2010-08-15 Post Count: 1197 |
A bit late... ;/ xD |
|
FalqJoin Date: 2007-12-31 Post Count: 2521 |
"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 |
|
FalqJoin Date: 2007-12-31 Post Count: 2521 |
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)] |
|
|
smiley599Join Date: 2010-01-23 Post Count: 21869 |
sniper is an object value |
|
FalqJoin Date: 2007-12-31 Post Count: 2521 |
yes it is but sniper.Name isn't and that won't work either |
|
FalqJoin Date: 2007-12-31 Post Count: 2521 |
apparently i just beat scripting helpers
crap |
|