0

# How do I make a text button open another text button?

So I have two text buttons under a frame. One is labeled ButtonA. The other is labeled ButtonB. Button A is visible but not button B. Anyone know how to make it so when you click button A, it makes button B visible? Would the script normal or local? Where would i put it?

0
@tumtidy has pretty much the right awnser, but i'd like to get something straight: Local scripts are only for the player who has that script running while server scripts, or normal scripts run for everyone.  local scripts are mainly used in starter gui and starter player, im kind of new to scripting so i mightve gotten a bit wrong there. Partykidcrazy 15 — 14d
0
that does make sense. ill try both and see Cubispaghettis 1 — 8d

1
Edited 15 days ago

Hi, I think I have found the solution. First, add a (normal) script into ButtonA and then copy and paste this code. Make sure ButtonB is not visible before running your code.

local ButtonA = script.Parent
local ButtonB = script.Parent.Parent.Parent.Frame.ButtonB

script.Parent.MouseButton1Click:Connect(function()
if ButtonA.Visible == true then
ButtonA.Visible = false
ButtonB.Visible = true
else
ButtonA.Visible = true
end
end)


Let me know if this helps. Also, you can change the variables if you have named your frame or buttons differently.

0
if its a screen gui, it should work fine with a local script, right? Partykidcrazy 15 — 14d
0
from what I know either a local script or a server script could work as each instance of a gui is under the player's gui and not seen by the server MoralArsonism 47 — 11d
0
Alright, thanks! Cubispaghettis 1 — 8d
0
The problem is that both buttons have the same parent, so what do i need to change Cubispaghettis 1 — 8d