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: == ROBLOX Update Information ==

Previous Thread :: Next Thread 
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Jan 2014 09:08 PM
Since the new ROBLOX update, the game data takes longer to load. If you have experienced "[YourChildName] is not a valid member of [YourParentName]" or something like that and it is perfectly correct, you must add a "[YourParentName]:WaitForChild([YourChildName]). For example, my script was:

== My Old Script ==
game.Players.PlayerAdded:connect(function(p)
local gui = script.InformationGui:clone()
gui.Parent = p.PlayerGui
end)

Output was: PlayerGui is not a valid member of p
Did it work: No

== My New Script [Added that WaitForChild]==
game.Players.PlayerAdded:connect(function(p)
local gui = script.InformationGui:clone()
p:WaitForChild("PlayerGui")
gui.Parent = p.PlayerGui
end)

Output was: Nothing
Did it work: Yes
Report Abuse
Laedere is online. Laedere
Joined: 17 Jun 2013
Total Posts: 23601
04 Jan 2014 09:09 PM
ok
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
04 Jan 2014 09:09 PM
-_-

WaitForDataReady()

^^^^^^^^
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
04 Jan 2014 09:09 PM
... you should of always done this.
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Jan 2014 09:09 PM
or ^
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Jan 2014 09:11 PM
xSIXx

I have studied other scripts, and it doesn't have those methods. It worked, the old script of mine was working at first, but when ROBLOX updated, it didn't work.
Report Abuse
mic144 is not online. mic144
Joined: 14 Oct 2009
Total Posts: 1598
04 Jan 2014 09:11 PM
You should of always done this, leaks threads also the character loads before the player sometimes so.

-- $$ Get on my level, here use this ladder. Don't fall down on the way up! $$ --
Report Abuse
Azureous is not online. Azureous
Joined: 29 Jan 2012
Total Posts: 25287
04 Jan 2014 09:11 PM
@Devil WaitForChild() has always been around or at least in Roblox.Lua
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
04 Jan 2014 09:12 PM
"I have studied other scripts, and it doesn't have those methods. It worked, the old script of mine was working at first, but when ROBLOX updated, it didn't work."

correction.

*you should of always done this if you knew what you were doing.
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
04 Jan 2014 09:18 PM
I am posting this for other people to learn WaitForChild method, in case they don't know.
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
04 Jan 2014 09:34 PM
This isn't it

I would personally use

repeat wait() until [code]

Also the update for broken scripts with CARS was that the seat now takes HumanoidRootPart not Torso

Medium Script0r
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