|
| 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
|
  |
| Joined: 29 Mar 2011 |
| Total Posts: 32902 |
|
| |
|
|
| 07 Dec 2012 02:46 PM |
Probably just didn't get created yet.
while (not script.Parent:FindFirstChild("HealthGUI")) do Wait() end |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 07 Dec 2012 04:10 PM |
OR
repeat wait(0.2) until player.PlayerGui.HealthGui
- thedestroyer115 |
|
|
| Report Abuse |
|
|