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
 

Re: Why doesn't this work

Previous Thread :: Next Thread 
KeithRBX is not online. 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 is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
28 Jul 2014 01:47 PM
sniper is a string, right?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 Jul 2014 01:48 PM
where did you define the varible sniper
Report Abuse
Falq is not online. 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 is not online. 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
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
28 Jul 2014 03:43 PM
wats OP

Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 Jul 2014 03:44 PM
original poster (guy who made thread)
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
28 Jul 2014 03:44 PM
k thx m8 will be usful
Report Abuse
kingstarwest is not online. kingstarwest
Joined: 15 Aug 2010
Total Posts: 1156
28 Jul 2014 03:44 PM
Original Poster
Report Abuse
kingstarwest is not online. kingstarwest
Joined: 15 Aug 2010
Total Posts: 1156
28 Jul 2014 03:45 PM
A bit late... ;/ xD
Report Abuse
Falq is not online. 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 is not online. 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
Alpha5001ALT is not online. Alpha5001ALT
Joined: 14 Mar 2013
Total Posts: 929
28 Jul 2014 04:31 PM
bump 4 help
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
28 Jul 2014 04:42 PM
sniper is an object value
Report Abuse
Falq is not online. 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 is not online. Falq
Joined: 31 Dec 2007
Total Posts: 2521
28 Jul 2014 06:10 PM
apparently i just beat scripting helpers

crap
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