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 » Scripters
Home Search
 

game.Players:getPlayers()

Previous Thread :: Next Thread 
lnformaI is not online. lnformaI
Joined: 02 Jul 2009
Total Posts: 1684
27 Mar 2016 03:34 PM
When I run

if #players == 1 then
print("Hello")
end

after joining the game, why does nothing happen?

Thanks in advance.

hi everypony /)^3^(\
Report Abuse
ScriptingRevolution is not online. ScriptingRevolution
Joined: 19 Sep 2015
Total Posts: 528
27 Mar 2016 03:35 PM
players = game.Players:GetChildren()
if #players == 1 then
print("Hello")
end
Report Abuse
lnformaI is not online. lnformaI
Joined: 02 Jul 2009
Total Posts: 1684
27 Mar 2016 03:38 PM
Unfortunately, it still seems to do nothing. The troubling part is:

players = game.Players:GetChildren()
print("Running")
while true do
print("Running2")
wait(2)
if #players == 1 then
print("Running3")
end

No error is returned. Running prints, Running2 prints, but not Running3 when I join the server.

hi everypony /)^3^(\
Report Abuse
Fabunil is not online. Fabunil
Joined: 25 Oct 2013
Total Posts: 4325
27 Mar 2016 03:41 PM
print("Running")
while true do
print("Running2")
players = game.Players:GetChildren()
wait(2)
if #players == 1 then
print("Running3")
end
Report Abuse
lnformaI is not online. lnformaI
Joined: 02 Jul 2009
Total Posts: 1684
27 Mar 2016 03:42 PM
Perfect. Looks like the function was just out of scope.

hi everypony /)^3^(\
Report Abuse
Casualist is not online. Casualist
Joined: 26 Jun 2014
Total Posts: 4443
27 Mar 2016 03:43 PM
That definitely errors.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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