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 » Scripters
Home Search
 

Re: GUI quick help

Previous Thread :: Next Thread 
UltraPride is online. UltraPride
Joined: 18 Aug 2011
Total Posts: 81
18 Oct 2015 02:34 PM
So I have a Gui in StarterGui and want it to be destroyed upon clicking a button, but after it's destroyed I want a new Gui to pop up. Help please?
Report Abuse
Faisal1207 is not online. Faisal1207
Joined: 27 Dec 2013
Total Posts: 499
18 Oct 2015 02:44 PM
Aight, i'll assume there are two Frames named Frame1 and Frame2, respectively(Index for yourself elsewise)in StarterGui and(obviously)an screen Gui that they are childs of, and an button in workspace with an click detector, lastly this being an local script inside of the ScreenGui;

local plr = game.Players.LocalPlayer

local gui = plr.PlayerGui:WaitForChild("ScreenGui")

local destructFrame = gui:WaitFirChild("Frame1")
local popUpframe = gui:WaitForChild("Frame2")

local prt = game.Workspace:WaitForChild("Part")
local btn = prt:WaitForChild("ClickDetector")

btn.Mouse1Click:connect(function()
destructFrame:Destroy()
wait(1)
popUpframe.Visible = true
end)

--------------------------------


- "I say no because yes is overrated"


Report Abuse
UltraPride is online. UltraPride
Joined: 18 Aug 2011
Total Posts: 81
18 Oct 2015 03:51 PM
Thanks Faisal :D
Report Abuse
Dogejia is not online. Dogejia
Joined: 08 Feb 2012
Total Posts: 1873
18 Oct 2015 03:51 PM
Or use ChildRemoved >:)


gcmi lg lpxtlc; Decode it with Vigenere Cipher, keyword is Doge, if you dare >:)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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