Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make it so that when you press an ImageButton the screengui gets removed?

Asked by 4 years ago

AlvinBlox made a video on this but it got removed, so can anyone tell me how to make the screengui disappear when you press the button? Thanks in advance.

0
this is not a script request site dude, do some research before u ask for help Gameplayer365247v2 1055 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

sure; put the code in a localscript, and put the locascript in the button

local button =script.Parent -- put here the directory of the button
local screenGUI = --put here the directory for the screen GUI

button.MouseButton1Down:Connect(function()
    screenGUI.Enabled = false
end

change the value of screenGUIvaraible to where the screen GUI object is located

0
Thank you! MrTycooncoolguy 2 — 4y
0
accept my answer User#23252 26 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Make A ScreenGui, Add A Frame, Add A Button, And The Use This Method. This has to be in a localscript. nder the gui

Button1.MouseButton1Click:connect(function()
  ScreenGui:Destroy()
end)

Replace Button1 with your button and then you replace ScreenGui with your ScreenGui's Name.

0
Thank you! MrTycooncoolguy 2 — 4y

Answer this question