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

Run Code If on a certaint team?

Asked by 9 years ago

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

Log in to vote
3
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
9 years ago

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
0
Thank You, im also now trying to answer some questions aswell ioutragous 0 — 9y
Ad

Answer this question