Hi! I am making a GUI that when you click on it, the team change GUI appears. The changing teams works fine, I just can’t get the GUI to appear when I click it, and it won’t start off as transparent. Here is the script (bearing in mind I have no idea how to code, I just experimented around lol) I also haven’t managed to figure out how it closes when you click it again.
I think I arranged the parent child thing wrong
When using local Thing = Place, you can only use one single “=” and not 2 , like you did.
When saying the place of the thing, make sure that you go up (By using .Parent) until the Parent is the Parent of the thing.
For Graphics User Interface (GUI), it is always better to use the Visible Properties. So if Visible is true, then this Button/Frame/Text will show, and if Visible is false, then it won’t be visible.
There is no Properties called Transparency in ScreenGui Instances, so calling Transparency will do nothing.
When scripting, have the output tab visible, so if there would be any errors/mistakes, you could fix it yourself.
Here is a fixed version
local JoinLight = script.Parent.Parent:WaitForChild("JoinLight")
local JoinDark = script.Parent.Parent:WaitForChild("JoinDark")
local Or = script.Parent.Parent:WaitForChild("Or")
local ChangeTeams = script.Parent
JoinLight.Visible = false
JoinDark.Visible = false
Or.Visible = false
ChangeTeams.Visible = true
script.Parent.MouseButton1Click:Connect(function()
-- ChangeTeams.Visible = false (remove the -- at the start and this text inside the () if you want that ChangeTeams Button becomes invisible after being clicked. Otherwise delete this line)
JoinLight.Visible = true
JoinDark.Visible = true
Or.Visible = true
end)