If you’re looking to avoid teamkills you could add an stringValue and a script inside StarterCharacterScripts, so when the character is added the script detects the player’s team and puts the team name on the value. So when your using weapons, detect if the value inside the character is the same of the attacker’s team value.
inside the TeamScript:
local player = game:GetService("Players"):GetPlayerFromCharacter(script.Parent)
script.Parent.teamValue.Value = player.Team.Name
Are you sure you REALLY searched for this topic? One google search for this gave me a decent thread with a solution. If this doesn’t guide you in the right direction, please let me know for further assistance.