How exactly would I be able to detect if a player is on a team. This GUI opens another GUI, but I only want it to do the stuff in the script if the player is on one of ***two *** select teams.
local black = false
function codrop()
if black == false then
script.Parent:TweenPosition(UDim2.new(0, 0,0, 350), "In", "Linear", 2)
wait(0.1)
black = true
script.Parent.Parent.CourtMenu.Text = "Close CM"
elseif black == true then
script.Parent:TweenPosition(UDim2.new(0, 1500,0, 350), "Out", "Linear", 1)
black = false
script.Parent.Parent.CourtMenu.Text = "Court Menu (CJ)"
end end
script.Parent.Parent.CourtMenu.MouseButton1Down:connect(codrop)
edit: or... maybe the GUI button you click on to open this item would only be visible to two teams, rather than it just not doing anything

6 comments
does not work for anyone now
maybe it is conflicting with the black statements
I put it in another script to make it invisible if they aren't on the team but it still works for everyone now... UGH
I'm sorry for that poor answer, I made some changes to make it easier to understand
really?
who gave me another bad rep? i fixed my answer, how is that deserve a bad rep???