|
| 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 |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|