Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make anti- same team killing?

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?

1 comment

0

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.

1 answer

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.