Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

3 comments

1

usa lua tags

0

its a button in the text editor

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.

2 answers

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

3 comments

0

please do not ever answer a question without lua tags

0

wtf is lua tag

0

and what type of scirpt and were do i put it

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

This discussion is preserved as it was. New answers, comments, and votes are closed.