so as i said in the title i want to make a button that only shows if the player is in a specific team and ive already tried this:
while true do
local Teams = game:WaitForChild("Teams")
wait(0.01)
if script.Parent.Parent.Parent.Parent.Team.Name == "Administrative Department" or "Ethics Committee" then
script.Parent.Visible = true
else
script.Parent.Visible = false
end
end
the structure of it is
StarterGUI
CodeUI(ScreenGUI)
TextButton
UICorner
WhileLoop(script Obove)
Press(script Below)
UI(Frame)
And this is the Press Script
script.Parent.MouseButton1Down:Connect(function()
if script.Parent.UI.Visible == false then
script.Parent.UI.Visible = true
script.Parent.Text = "Close Alarm Code UI"
else
script.Parent.UI.Visible = false
script.Parent.Text = "Alarm Code UI"
end
end)
