Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why wont this team colour filter work? (WHY IS THIS STILL NOT SOLVED?)

local thingy = game.Players.LocalPlayer

if thingy.TeamColor == thingy.TeamColor("White") then -- The team colour filter (I called the Lobby)
	script.Parent.Visible = false -- Makes the GUI invisible
else
	script.Parent.Visible = true -- Makes the GUI visible
end

4 answers

✓ Accepted answer

Just compare it directly with the team's color:

if thingy.TeamColor == game.Teams.SomeTeam.TeamColor then

Make sure to change "SomeTeam" to the team's name

1 comment

0

Thank you!! it worked!

local thingy = game.Players.LocalPlayer

if thingy.TeamColor == BrickColor.new("White") then -- The team colour filter (I called the Lobby)
	script.Parent.Visible = false -- Makes the GUI invisible
else
	script.Parent.Visible = true -- Makes the GUI visible
end

Try this:

local thingy = game.Players.LocalPlayer

if thingy.TeamColor == "White" then -- try this
    script.Parent.Visible = false 
else
    script.Parent.Visible = true 
end

Also, does this output any errors?

local thingy = game.Players.LocalPlayer --You could try to do "script.Parent.Parent.Parent.Parent" and etc.

if thingy.TeamColor == BrickColor.new("White") then -- The team colour filter (I called the Lobby)
    script.Parent.Visible = false -- Makes the GUI invisible
else
    script.Parent.Visible = true -- Makes the GUI visible
end

TeamColor isn't an actual color value like BrickColor or Color3. TeamColor uses BrickColor. You could turn Color3 into BrickColor.

Edit: I don't get why This has -2 votes when there is another person with the exact thing I put excpet he was 2 votes. The logic.

9 comments

0

It didn't work somehow

0

I forgot, You need a ".new" at the end of BrickColor, I edited it.

0

It still didn't work :(

0

Is is local?

0

ye

0

Remove thingy.

0

Thanks Gamenew, It was late and I was tired.

0

I feel like this guy is just plain trolling. Just down vote him.

0

I even uploaded an hour before him...

This discussion is preserved as it was. New answers, comments, and votes are closed.