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

so i want to click textbutton frame pops up, i made a script help??

Asked by 5 years ago

so my script is post to when i like the textbutton anothe frame apears help here is the scirpt that i made

print("Close buttot loaded")

textbutton = script.Parent frame = button.Parent display = frame2.Help -- = Change Window to the name of the object you want to close/open, copy and paste this for more: randomname = window.NAME

function onClicked(GUI) if display.Visible == true then --False = Closed display.Visible = false -- this will close "NAME", and only "NAME", if there is more you want to be closed/open put this: randomname.Visible = False/True ;D button.Text = "Open Help" else display.Visible = true --True = Open button.Text = "Close Help" end end script.Parent.MouseButton1Click:connect(onClicked)

sorry that i dont have code blocks what did i do wrong

1
usa lua tags DinozCreates 1070 — 5y
0
its a button in the text editor DinozCreates 1070 — 5y
0
Whats with the unaccept? Not working? Please provide info on to the reason why, because if other users are also wondering the same thing, they may not know if my script works or not. popgoesme700 113 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

How about like function onClicked(GUI) if display.Visible == true then Closed display.Visible = false so, make when you click it, it makes it visible = true then the current gui that you want to make it to be gone, as visible = false

0
please do not ever answer a question without lua tags DinozCreates 1070 — 5y
0
wtf is lua tag diamondwolf3003 -25 — 5y
0
and what type of scirpt and were do i put it diamondwolf3003 -25 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Seeing as you didnt do this correctly. Im assuming your guis are named the way in the script.

To show and hide a gui, there is the .visible property. If it is true then the gui is visible, if it is false, then it is not.

Your code seems to be really broken, and is also hard to read when not in code blocks. Ill try to help, but im not even sure where this script is, what the object's names are, etc.

If this doesnt work, please do provide us with more info, so we can try to help.


textbutton = script.Parent --This is you button, script then should be placed into the button. frame = textbutton.Parent -- I dont even know what this is. Display = frame.Help --This is the gui you want to be closed and opened. --Below is a working visible, true-false function textbutton.MouseButton1Click:connect(function() if Display.Visible== true then --Checks if the gui is visible, if so close it Display.Visible= false textbutton.Text= "Open Help" --This should be the text the button shows to open the gui. else --Elsewise, if not visible then open it. Display.Visible= true textbutton.Text= "Close Help" --This should be text to show on button to close the gui. end end) print("Close button has been loaded")

Answer this question