I understand this is not a website for asking people to write you a script from scratch but this is a question ive been wondering for a long time how can I make a Ai identify players on a team? I just cant seem to make a script that works
COMMUNITY QUESTION
How to prevent a Ai from attacking a player on a certain team?
1 answer
if game.Players:GetPlayerFromCharacter(character).TeamColor == AI.ColorNotToAttack.Value then
--dont attack
else
--attack
end
You would need if statements and a value in the AI to know which team not to attack
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Put the code inside a Lua code block.