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
 

How can i fix this error?

Previous Thread :: Next Thread 
Waz_Up is not online. Waz_Up
Joined: 07 Jan 2012
Total Posts: 113
13 Sep 2016 02:37 PM
so in my script i have this code

~~~~~~~~~~~~~~~~~
local data = player:WaitForChild("DATA")
~~~~~~~~~~~~~~~~~
but each time i test it i get an error from it is there a way i can fix it?



Report Abuse
ManxFox is not online. ManxFox
Joined: 12 Nov 2008
Total Posts: 227
13 Sep 2016 03:54 PM
it's waiting for an object called "DATA". if there is no object called DATA in player then it will become an infinite yield meaning the script cannot progress any further


Report Abuse
KreoBox is not online. KreoBox
Joined: 24 Aug 2016
Total Posts: 356
13 Sep 2016 03:58 PM
It. Is. Not. An. Error.
Report Abuse
ManxFox is not online. ManxFox
Joined: 12 Nov 2008
Total Posts: 227
13 Sep 2016 04:00 PM
if it wasn't an error it wouldn't be popping up would it?

send the whole script so I can see exactly what it's doing


Report Abuse
KreoBox is not online. KreoBox
Joined: 24 Aug 2016
Total Posts: 356
13 Sep 2016 04:03 PM
HE NEVER SAID ANYTHING ABOUT A POPUP.

It. Is. A. Warning.

Try looking at it.
Report Abuse
ManxFox is not online. ManxFox
Joined: 12 Nov 2008
Total Posts: 227
13 Sep 2016 04:05 PM
###### was a metaphor, you pleb. and yes, it is a warning. BUT that warning stops the script from doing anything else until it's dealt with, therefore # class that SPECIFIC warning ## an error.
Report Abuse
KreoBox is not online. KreoBox
Joined: 24 Aug 2016
Total Posts: 356
13 Sep 2016 04:10 PM
No. IT IS NOT AN ERROR.

There was an update a little while ago. It made this warning happen if the object WaitForChild is waiting for does not exist already.

IT DID NOT CHANGE HOW ANYTHING WORKED. THE SCRIPT WORKS FINE.
Report Abuse
ManxFox is not online. ManxFox
Joined: 12 Nov 2008
Total Posts: 227
13 Sep 2016 04:12 PM
Mate, you need some water to wash down all that salt.
I don't know why you're so salty right now but it's giving this thread a bad atmosphere, no one wants to deal with your crappy attitude. So peace.

for the record, he asked what would stop it from happening. I answered his question so I'm done here.


Report Abuse
KreoBox is not online. KreoBox
Joined: 24 Aug 2016
Total Posts: 356
13 Sep 2016 04:16 PM
I am very sick and tired of explaining that it is a warning, it doesn't mean the script is broken, just because you see a stack trace in the output doesn't mean it is an error.

Sometimes things need to be created at runtime.
Report Abuse
FloweryMonkeyboy5 is not online. FloweryMonkeyboy5
Joined: 19 Sep 2012
Total Posts: 528
13 Sep 2016 05:08 PM
WaitForChild NEVER returns an error, only thing it will do is give a warning to the output after an X amount of seconds that it is possible to infinitely yield.

In the case the object never loads then the script will hang.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
13 Sep 2016 05:14 PM
Is this for data persistence? If yes, use Datastores. Otherwise if its a gui, make sure the data exists and use a localscript


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