|
| 20 Oct 2012 12:44 PM |
I was THINKING about just making it to when a person's character is added, it goes to their player's PlayerGui and makes the health bar invisible, but I was wondering if there's an easier way.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 12:57 PM |
wait(1) script.Parent.HealthGUI:remove() Put this in the starter GUI |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 01:00 PM |
Your script didn't work, and my script didn't either:
function ca(playa) if playa.ClassName == "Model" then player = game.Players:GetPlayerFromCharacter(playa) player.PlayerGui.HealthGUI.tray.Visible = false end end
game.Workspace.ChildAdded:connect(ca)
It says that HealthGUI isn't a member of my PlayerGui. IT IS.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 01:05 PM |
| Mine did work. I just used it. |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 01:15 PM |
Yeah, it didn't work the first time I used it. Thanks. I got mine to work too :D
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 01:17 PM |
Can I see what the working one of yours is?
(I try and see what was wrong with a script...Thats how I learned 90% of the scripting I know) |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 01:19 PM |
function ca(playa) if playa.ClassName == "Model" then player = game.Players:GetPlayerFromCharacter(playa) wait(1) player.PlayerGui.HealthGUI.tray.Visible = false end end
game.Workspace.ChildAdded:connect(ca)
The wait is actually unnecessary, it's just that it didn't work when I first joined the game, because the HealthGUI hadn't loaded into my player yet.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 01:20 PM |
Oh, nvm, the wait is necessary.
Tactical Rainboom Inbound |
|
|
| Report Abuse |
|
|