Im trying to find an open/close script for my start gui, but they all seem to not work or are scripted in a way a cant edit. Im not sure if im suppost to use a frame with the 3 text buttons i have in this ui but all the scripts ive been looking at or finding have been scripted that way. Im just looking for a simple fix.
Ignore the weird question mark in the title for some reason it had to be there.
Welp, you can't really ask for requests here but sure i'll show you, this doesn't use any scripting knowledge, it's just a smart setup only using variables. Now obviously your gui is gonna have a button, either a text button or an image button, im not sure how you set it up so you may wanna do some changes in your script, we are going to use a local script since all ui objects are local,
local frame = script.Parent.Parent -- this is your main ui that is a parent of all other uis local button = script.Parent -- or wherever your button is local open = false -- this var that is storing a boolean value is gonna determind if our gui is open or closed, you wanna set it to false by default since your ui is gnna be closed at first button.MouseButton1Click:Connect(function() --this is the event that were gonna use, it fires when the ui is clicked if open == false then open = true frame.Visible = true else open = false frame.Visible = false end end)
and that's really it, the Visible
propety isprety much self explainbale, if its false local player wont see the ui, if its true he does.
I notice that you have no knowledge of scripting, and that's relly bad to just always ask others to make them stuff, start learning!
Closed as Not Constructive by WideSteal321, starmaq, User#24403, and EpicMetatableMoment
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?