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?
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.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
So if you have a sword or something to kill players you need to check if the player is in the same team as the player who damages the other player then it does the damage if the player is not in the same player as the player who damages them.