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

How do I do this?

Asked by 9 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I am trying to make a script so It gets the LocalPlayer and if their on the Team with the Navy Blue color then something happens. Anybody know how to do this?

2 answers

Log in to vote
2
Answered by 9 years ago

You've asked some very similar questions in the past, and I'd like to hope that you can use your brain. I don't believe you were looking for a simple if statement, given that you're posting this again.

local Player = game.Players.LocalPlayer
Player.Changed:connect(function(p)
if p == 'TeamColor' and Player.TeamColor == BrickColor.new'Navy blue' then
-- Your team. Player just got switched.
end
end)

That'll run your code as soon as the Player is switched to Navy blue team

Ad
Log in to vote
0
Answered by 9 years ago
if game.Players.LocalPlayer.TeamColor == BrickColor.new("Navy blue") then
    something happens
end

This must be in a localscript

0
And the reason why I reposted is because that other one didn't answer my question. silverminer226 4 — 9y

Answer this question