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?
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?
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.
Why would anyone down vote your answer for trying? Was -1 before I up voted.
What I mean is like the localplayer not a specific player name.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
This question is a little too broad to answer accurately. Please provide more information to give you better help.