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
 

Will this line of code work?

Previous Thread :: Next Thread 
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
24 Jul 2012 03:38 AM
for i,v in pairs(game.Players:GetChildren()) do
end
if v.Value >= 2 then

~★That, is why we live in a world full of morons★~
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Jul 2012 03:39 AM
Nope.
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
24 Jul 2012 03:40 AM
@Cheater How do I fix it?

It's suppose to make the script run when there are more than two players.

~★That, is why we live in a world full of morons★~
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Jul 2012 03:40 AM
Do this instead:

if game.Players.NumPlayers >= 2 then
floodcheck
end
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
24 Jul 2012 03:41 AM
you need an end for the if, and the if should be inside the in pairs and its end soz..

for i,v in pairs(game.Players:GetChildren()) do
if v.Value >= 2 then--This is an IntValue then you should declear befor that if an item is a IntValue or it wont work.
end
end

--In the end from what i said

for i,v in pairs(game.Players:GetChildren()) do
if v:IsA("IntValue") then
if v.Value >= 2 then
end
end
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Jul 2012 03:41 AM
For example you could do this:

while wait() do
if game.Players.NumPlayers >= 2 then
--script
end
end
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
24 Jul 2012 03:42 AM
I never knew there was a NumPlayers value. Thanks.

~★That, is why we live in a world full of morons★~
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
24 Jul 2012 03:42 AM
Cheater, use while wait() do, not sure what is floodcheak.
your script will work only for one time :c
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Jul 2012 03:43 AM
u slow
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
24 Jul 2012 03:44 AM
Lawl.

~★That, is why we live in a world full of morons★~
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Jul 2012 03:45 AM
Floodcheck is when you're posting to fast on the forum.
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
24 Jul 2012 03:47 AM
im gona QQ and die in the curner becauze of u

;~;
Report Abuse
Cheater is not online. Cheater
Joined: 29 Jun 2007
Total Posts: 5258
24 Jul 2012 03:53 AM
NUUUUUUUUUUUUUUUU!
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