I have this gui here with an options button, I want to be able to click the options button and it opens another gui, can anyone help me with this?
local gui= script.Parent.Parent:FindFirstChild("gui") local options= script.Parent local open = false options.MouseButton1Down:connect(function() if open == false then wait(0.5) menu:TweenPosition(UDim2.new(0.25,0,0.2,0), "Out", "Quad", 1) open = true else wait(0.5) menu:TweenPosition(UDim2.new(-1,0,0.2,0), "Out", "Quad", 1) open = false end end)
That should do it. Of course you will need to edit it to your preference.
Here's the general idea of how to open a GUI using a GUI button.
local BUTTON = {PATH TO THE GUI BUTTON HERE} local GUIToOpen = {PATH TO THE DESIRED GUI TO OPEN HERE} BUTTON.MouseButton1Down:Connect(function() GUIToOpen.Visible = true end)
You can modify the script in any way to make it toggleable, have more functions etc. You can make many things with this script, just explore more with it. :)
Closed as Not Constructive by User#21908 and User#23365
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?