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.