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

How do I do this?

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

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

if game.Players.LocalPlayer.TeamColor == BrickColor.new("Navy blue") then
	something happens
end

This must be in a localscript

1 comment

0

And the reason why I reposted is because that other one didn't answer my question.

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