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: How do you make the health bar invisible?

Previous Thread :: Next Thread 
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
20 Oct 2012 12:57 PM
wait(1)
script.Parent.HealthGUI:remove()
Put this in the starter GUI
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
20 Oct 2012 01:05 PM
Mine did work. I just used it.
Report Abuse
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
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
michaelaqz4 is not online. michaelaqz4
Joined: 23 Sep 2009
Total Posts: 1940
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
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
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
1cooldude361 is not online. 1cooldude361
Joined: 13 Mar 2010
Total Posts: 4403
20 Oct 2012 01:20 PM
Oh, nvm, the wait is necessary.

Tactical Rainboom Inbound
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