I'm making a shooting game, both 1st and 3rd person and I'm adding my own personal health GUI, I was wondering how you can remove the other one? I tried a basic script but got stuck, so it went like this:
Game.Players. ?? PlayerGUI.HealthGUI:remove()
I'm not sure what to do. Please reply with a working script. Thank you for reading
-iFluster
~~~~~~~~~~~~~~~~~ game.StarterGui:SetCoreGuiEnabled("Health",false)
~~~~~~~~~~~~~~~~~ This should work. Have a nice day
Try Using This Script and put in the StarterGUI:
wait(1) if script.Parent:FindFirstChild("HealthGUI") ~= nil then script.Parent.HealthGUI:remove() wait(0.5) script:remove() end
I will post some wiki links these will help you easily do it.
http://wiki.roblox.com/index.php?title=SetCoreGuiEnabled_(Method) http://wiki.roblox.com/index.php?title=CoreGuiType
Make sure to look at both of them and it will be easy to do what you want to do.
This script will remove the Players HealthGUI(which btw has recently changed :D) when the data is loaded.
Make a normal script on your PlayerBackpack. Put inside :
wait(3) if script.Parent.Parent.PlayerGui:FindFirstChild("HealthGUI") ~= nil then script.Parent.Parent.PlayerGui.HealthGUI:remove() --Look Down end
If you are only going to have a script for that 3-line code. You will probably want to remove it.
wait() script:remove()
local StarterGui = Game:GetService('StarterGui') StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
Put inside of the StarterGUI with a Local Script