if player:IsInGroup then, dont do this BUT
if player.TeamColor == teams.Example.TeamColor then
player.WalkSpeed = 100 or whatever
COMMUNITY QUESTION
What would I use to have the script say if Player:IsInGroup then, Dont run this part of the code?
2 answers
You can do this by using if statements kind of the way you did...
if player.TeamColor == teams.Example.TeamColor and not player:IsInGroup(120342324) then
print('Neat!')
end
This will make it so if the player is in the group or on the wrong team then the code will not run, but if the player isn't in the group and the player is on the team, then it will run.
Not really. So I have this code here.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
local teams = game:GetService("Teams")
local tools = player.BackPack:GetChildren(character)
if player.TeamColor == teams.Example.TeamColor then
for i = 1,#tools do
tools[i]:Remove()
end
end
end)
end)
At line 5 I want it to be If a player is on example team, BUT IF The player is ALSO in group 1234 then DO NOT DO THIS CODE
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
if not (team and group) or team then
pretty much what ^ said you just do if player.TeamColor == teams.Example.TeamColor and not player:IsInGroup(235151)
I edited my answer above