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: Check not passing?

Previous Thread :: Next Thread 
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
18 May 2014 05:36 AM
In a localscript (which runs perfectly in Solo, of COURSE)
I've got a looping check to make sure two children are present within the tool.
Before this check, I have:
print('ducks1') -- Just to see how far the script has gotten.

Then this:

local stats = tool:findFirstChild("Stats")
local guimain = tool:findFirstChild("WeaponGui")
repeat wait() until stats~=nil and guimain~=nil

Then afterwards:

print('ducks2')

The output only shows ducks1, which means we didn't pass the check. These items are both in the tool when I look, but somehow, the script is literally ignoring their existance. Any help?
Report Abuse
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
18 May 2014 05:43 AM
Annnnyone at all?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
18 May 2014 05:52 AM
That is like saying
var_1 = false
var_2 = true
repeat wait() until var_1 and var_2

You aren't checking again.

Try something like this:

repeat wait() until parent:findFirstChild(child_1) and parent:findFirstChild(child_2)
Report Abuse
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
18 May 2014 05:55 AM
That....makes sense.
Thanks!
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