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

Run Code If on a certaint team?

I'm trying to get this code so that if a player's on a certain team then a function will begin to run. Here's my non-functioning code:

if game:GetService("Players").LocalPlayer.Team == ("Bright blue") then --Not sure the proper protocol getting a players team.

Please help me out! thanks for reading and helping :D

1 answer

You're close. The property you're looking for is called TeamColor, and you have to use the BrickColor.new() constructor to get a BrickColor value:

if game:GetService("Players").LocalPlayer.TeamColor == BrickColor.new("Bright blue") then

1 comment

0

Thank You, im also now trying to answer some questions aswell

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