Need help for anti team kill certain for FE Gun Kit

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

2 Likes

Not think its can be solution but do you tried do a renaming a humanoids to each team their own and then make if hum.name = ### then?

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

Player.Team.Name == “Grey”

and

Player.Team.Name == “Black”

1 Like

i put it in where? @slendarcoolfan

@slendarcoolfan tell me please where I should put it

Where the scripts takes damage when hitting
Example:

script.Parent.Touched:Connect(function()
Humanoid:TakeDamage() -- Or something like that
end)

Delete Take Damage or the line that takes damage and paste that

but can you tell me where I should put it?In workspace or ServerScriptService or…???

in the tool script that should damage the player that is hitted (Example: Sword)

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

(sorry for bad formatting typed it all on mobile)

1 Like

I make like this does it working?

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```

yeah it should work if you make it that the script can understand

tell me where place it on where and does it work? send me 1 video to watch, i want see it work because sometimes i cant get in Studio

I advise looking at tutorials on the FE gun kit as it would take a long time for me to explain it now

but what part that script make tool can disable kill team? that’s so logic

I forgot to put in the code this

PlayerHitted.Character:FindFristChildOfClass("Humanoid"):TakeDamage(30)

instead of this

PlayerHitted:FindFristChildOfClass("Humanoid"):TakeDamage(30)

this? @slendarcoolfan

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

but hey @slendarcoolfan It’s local script or script?

It is a script but i dont know how to explain how you can make it.

like this @slendarcoolfan, does it works, if cant work, i will about dispoinned it XD

You should put it in the GunScript_Server in the part that the player gets damaged when hitted and change the variables