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: Removing a GUI

Previous Thread :: Next Thread 
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 08:35 PM
Is there anyway I can remove the health bar?

I have only seen it done once.

Side question for bonus points (:P):

What script could I use to put in a GUI so if the humanoid LOSES health, the sides of the screen go red for couple of seconds.

Thanks!

print('print('PRINT-CEPTION')')

P.S. If you didn't figure it out already, I am making an FPS game. I am looking for people to help and be on my team. Those who join the team get rewards in-game.

Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 08:43 PM
Bump.

    print('print('PRINT-CEPTION')')
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
07 May 2013 08:45 PM
I think you would just have to remove:
player.PlayerGui.HealthGUI


For the second, just use this event:
Humanoid.HealthChanged:connect()
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 08:49 PM
Thanks! I used this:

    player.PlayerGui.HealthGUI :remove()

    print('I am such an amateur scripter, I can't believe I did that!')
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 08:50 PM
It doesn't stay. D:<

    print('>:(')
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 08:55 PM
I did this:

    local function onPlayerEntered(newPlayer)
    player.PlayerGui.HealthGUI :remove()
end


IT DOESN'T STAY :(
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
07 May 2013 08:58 PM
What do you mean it doesn't stay? I thought you wanted to kill it.

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
wait()
game.Debris:AddItem(player.PlayerGui.HealthGUI,0)
end)
end)
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 08:58 PM
I meant it stays! xD
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 09:01 PM
Bump.
Report Abuse
chris1989 is not online. chris1989
Joined: 30 Nov 2007
Total Posts: 2520
07 May 2013 09:30 PM
put this in a LocalScript in the StarterGui

local gui = script.Parent:WaitForChild("HealthGUI")
gui:Destroy()
script:Destroy()
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 09:44 PM
Still there.
Report Abuse
Kaioj is not online. Kaioj
Joined: 19 Apr 2013
Total Posts: 126
07 May 2013 09:46 PM
Nevermind! I had it in workspace so I transferred it into StarterGUI and it's gone! Thanks everyone!
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