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

How come this doesn't work?

Well, when I test this in Studio the button disappears and the frame doesnt become visible.

script.Parent.MouseButton1Click:connect(function()
	script.Parent.Frame.Visible = true
	script.Parent.Visible = false
end)

1 answer

The problem is when you make script.Parent.Visible = false, you are making the entire thing not visible.

Basically, when you make a Parent.Visible = False, anything in it is also no longer visible.

So you have

script.Parent.MouseButton1Click:connect(function()
    script.Parent.Frame.Visible = true
    script.Parent.Visible = false
end)

But I would do

script.Parent.MouseButton1Click:connect(function()
    script.Parent.Frame.Visible = true
    script.Parent.Active = false
end)

Or something similar. You can expand on this such as also changing the script.Parent.Text (if you are using a text button) to nothing, and making the BackroundTransparency = 1 or so on. When active = false, it means if you click on it, it doesn't do anything. If this doesn't work, please private message me.

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