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: What is the HealthGUI renamed to?

Previous Thread :: Next Thread 
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
07 Dec 2012 12:13 PM
wait(0.2)
script.Parent:findFirstChild("HealthGUI"):Destroy()

Perfection is not attainable, but if we chase perfection we can catch excellence.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
07 Dec 2012 12:49 PM
[ Content Deleted ]
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
07 Dec 2012 02:46 PM
Probably just didn't get created yet.

while (not script.Parent:FindFirstChild("HealthGUI")) do Wait() end
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
07 Dec 2012 02:47 PM
What do you mean not created yet?

Perfection is not attainable, but if we chase perfection we can catch excellence.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
07 Dec 2012 02:48 PM
When a player first spawns, the HealthGUI isn't always created instantly. Sometimes it takes a bit of time for it to load. I know you have a 'wait(0.2)' there, but that might not be enough time.

The snippet of code I just posted above will wait for the object to exist.
Report Abuse
Alexrocksdude is not online. Alexrocksdude
Joined: 19 Jan 2011
Total Posts: 3828
07 Dec 2012 02:49 PM
Ah, I see. Thanks.

Perfection is not attainable, but if we chase perfection we can catch excellence.
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
07 Dec 2012 04:10 PM
OR


repeat wait(0.2) until player.PlayerGui.HealthGui


- thedestroyer115
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