Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

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

Asked by 9 years ago
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

Log in to vote
0
Answered by 9 years ago

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

0
Thank you!! it worked! supermarioworld323 45 — 9y
Ad
Log in to vote
1
Answered by 9 years ago
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
Log in to vote
-1
Answered by 9 years ago

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?

Log in to vote
-2
Answered by 9 years ago
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.

0
It didn't work somehow supermarioworld323 45 — 9y
0
I forgot, You need a ".new" at the end of BrickColor, I edited it. EzraNehemiah_TF2 3552 — 9y
0
It still didn't work :( supermarioworld323 45 — 9y
0
Is is local? EzraNehemiah_TF2 3552 — 9y
View all comments (5 more)
0
ye supermarioworld323 45 — 9y
0
Remove thingy. Gamenew09 180 — 9y
0
Thanks Gamenew, It was late and I was tired. EzraNehemiah_TF2 3552 — 9y
0
I feel like this guy is just plain trolling. Just down vote him. killerkill29 35 — 9y
0
I even uploaded an hour before him... EzraNehemiah_TF2 3552 — 9y

Answer this question