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

How to check TeamColor?

local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)

if vPlayer.TeamColor == "Bright blue" then
	print(vPlayer.TeamColor)
end		

Why wont this print, i have checked it over and over. It should work and print "Bright blue" but it dosent. Please help

1 answer

✓ Accepted answer

The Property thing TeamColor isn't a String Value, It's a BrickColor. You've been calling it as if it was a String. It should be

if vPlayer.TeamColor == BrickColor.new("Bright blue") then

Making the Overall Script...

local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)

if vPlayer.TeamColor == BrickColor.new("Bright blue") then
    print(vPlayer.TeamColor)
end     

Well, it should be...

Hope this helps, and actually works...

  • Kratos232

1 comment

0

oh i should of know that, thanks :) +1 and accepted

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