Example: You have a friend with you on the same team but you can still kill him.
I want to make it so you can't kill other people same team as you, how do I script it?
if you look in the classic roblox sword, in function blow or something, theres a line thats like
if team then -- checks if same team (i dont have the script out and just putting 'if team' doesnt check the team. adjust to how you get your teams.) return -- stops script end
you could put something like that right before the dmg part of your script.