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

How do I do this?

Asked by 9 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

So I am trying to write a script so if your in this team then something happens. But this is the closest guess I have xD

if game.Workspace.LocalPlayer.
-- After that I get really confused...

How do I do it correctly?

0
This question is a little too broad to answer accurately. Please provide more information to give you better help. MrNicNac 855 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I'll take my best guess at what you mean.

function isOnTeam(player, teamColor)
return player.TeamColor == teamColor;
end

Simply use it as

if isOnTeam(yourPlayer, yourTeamColor) then
-- Do things
end

Your question is however far too vague, and you're giving us too little to work on to provide you with a suitable and tailored answer.

0
Why would anyone down vote your answer for trying? Was -1 before I up voted.  Vezious 310 — 9y
0
What I mean is like the localplayer not a specific player name. silverminer226 4 — 9y
Ad

Answer this question