What do you want to achieve?
I want to script it set for every team certain whether can kill that team or not and Anti Team Kill too, it not working with FE Gun Kits
Example:
Team White - Allowed killing Team Orange
Can’t kill Team Black & Team Grey, Ally(Member of the team) Team Grey - Allowed killing Team White & Orange
Can’t kill Team Black, Ally(Member of the team) Team Black - Can kill all
Can’t kill Ally(Member of the team)
This is like the Permission kill limit for every team for what team can be allowed kill or not, like SCP Foundation Site 19
Analytics Dpt, RAISA, Director, O5 Council & Alpha-1 can allowed kill team other but Beta-7, Security Department, Science Department can’t kill
This is that game: S.C.P. Site-19 Roleplay - Roblox
I need it anti-team kill certain and Anti kill the member inside certain team(Sorry for bad grammar) It works like this:Anti killing certain teams as a team, need help!but with FE Gun kit
You can put this in every script you want You need to name every color team the same that you put in the script
if Player.Team.Name == "White" then -- The Player That Hits A Player
if PlayerHitted.Team.Name == "Black" then -- If HittedPlayer is On Team Black
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Grey" then -- If HittedPlayer is On Team Grey
print("Cant Hit")
elseif PlayerHitted.Team.Name == "White" then -- If HittedPlayer is On Team White (Ally)
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Orange" then -- If HittedPlayer is On Team Orange
PlayerHitted:FindFristChildOfClass("Humanoid"):TakeDamage(30)
end
You need to copy the code for every team that player can be
I do not recommend this code it is a mess you should avoid doing for readability and it is tough on memory a better way of doing it would be this
local teams = {
“White” = {
“Orange”, — anyone on team white can kill ——- anyone on team orange
}
}
for key,value in paris(teams) do
if key == Player.Team.Name then
for i,v in pairs(value) do
if Killer.Team.Name == v then
PlayerHitted.Character.Humanoid:TakeDamage(50)
end
end
end
Also that code wouldn’t work as on the take damage line it looks for a humanoid under the player instance which obviously isn’t there
if PlayerHitted.Team.Name == "Black" then -- If HittedPlayer is On Team Black
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Grey" then -- If HittedPlayer is On Team Grey
print("Can Hit")
elseif PlayerHitted.Team.Name == "White" then -- If HittedPlayer is On Team White (Ally)
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Orange" then -- If HittedPlayer is On Team Orange
PlayerHitted:FindFristChildOfClass("Humanoid"):TakeDamage(30)
end```
if PlayerHitted.Team.Name == "Black" then -- If HittedPlayer is On Team Black
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Grey" then -- If HittedPlayer is On Team Grey
print("Cant Hit")
elseif PlayerHitted.Team.Name == "White" then -- If HittedPlayer is On Team White (Ally)
print("Cant Hit")
elseif PlayerHitted.Team.Name == "Orange" then -- If HittedPlayer is On Team Orange
PlayerHitted.Character:FindFristChildOfClass("Humanoid"):TakeDamage(30)
end