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
1 | if game.Workspace.LocalPlayer. |
2 | -- After that I get really confused... |
How do I do it correctly?
I'll take my best guess at what you mean.
1 | function isOnTeam(player, teamColor) |
2 | return player.TeamColor = = teamColor; |
3 | end |
Simply use it as
1 | if isOnTeam(yourPlayer, yourTeamColor) then |
2 | -- Do things |
3 | 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.