TeamGUI is the GUI to show if you click the button
local (TeamGUI) = game.Players.LocalPlayer.PlayerGui:WaitForChild("TeamGUI") local button = script.Parent.TextButton
button.MouseButton1Click:Connect(function()) (TeamGUI).Enabled = true end)
TeamGUI is the GUI to show if you click the button
local (TeamGUI) = game.Players.LocalPlayer.PlayerGui:WaitForChild("TeamGUI") local button = script.Parent.TextButton
button.MouseButton1Click:Connect(function()) (TeamGUI).Enabled = true end)
Hey there!
I would recommend not going through the player's PlayerGui, and instead using more of a local sort of script. I'm blanking on what this term is called, sorry!
But anyways, I am assuming that the button is in a separate gui, just inside of a ScreenGui. I would write the script like this:
local openButton = script.Parent
local guiToOpen = script.Parent.Parent.Parent.Parent:WaitForChild("TeamGUI")
script.Parent.MouseButton1Click:Connect(function()
openButton.Visible = false
local frames = guiToOpen:GetChildren()
for i = 1, #frames do
frames[i].Visible = true
wait()
end
end)
Go ahead and change the guiToOpen variable to the correct amount of ".Parents"
I hope this helps, and please let me know if you have any further questions!
i dont know how many .parent to do.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You didn't format it correctly, please look at the guidelines and also how to make a good question.
You didnt format it as in you never even formatted it as a lua script, we cannot read the script nor can we help you while it's like this.