Friendly fire for teams

Hi. I was wondering if I can do friendly fire for a specific team, and if its possible then how to make it

1 Like

A way to that is whenever you do whatever (shoot for example), it gets the player you shot at and sees if they’re on the same team as you. If they are, no damage is taken, but, if they aren’t, then damage IS taken. Hope this helps.

You can simply check if the player who fired and the player who the player shot are on your “special” team and damage the second player accordingly.

1 Like

I think it would just be as easy as:

-- ...

if playerA.Team ~= playerB.Team then
    -- Damage
else
    -- Code for if they are on the same team, in case you want to warn them or something
end

1 Like