I was wondering how I could get a specific item to work against only one specific team. I'm trying to get tasers, only used by police, to work only against criminals. Both Police and Criminals are teams. Plus, how can I make that item teleport only one team (criminals) to a specific spot (jail)?
Sorry, I have the code on my other computer and I think I may have deleted what I have.
Anti-Teamkill scripts are pretty simple to do. Every weapon will have some sort of section of code on what to do when you hit someone. In that block, just compare your team and the person you hit's team.
if yourPlayer.TeamColor ~= personYouHit.TeamColor then --damage them end
GetPlayerFromCharacter
will likely come in handy.