|
| 17 Nov 2015 07:59 PM |
If anyone has a working anti team kill script could I use it? Or if you would be so kind, can you help me make this into a gun that doesn't kill team mates? I don't know how to properly make it check if the player that was hit by the bullets team is the same as the wielder of the guns team. Please help?
if ammo.Value > 0 and debounce == false then function damage(hit) if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= script.Parent.Parent.Name then local hum = hit.Parent.Humanoid hum.Health = hum.Health - dmg.Value bullet:Destroy() else if hit.CanCollide == true then bullet:Destroy() else end end end |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2015 08:27 PM |
I will keep bumping until this is answered.
-Bump |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Nov 2015 08:37 PM |
if ammo.Value > 0 and debounce == false then function damage(hit) if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= script.Parent.Parent.Name then plr = game.Players:GetPlayerFromCharacter(hit.Parent) plr2 = game.Players:GetPlayerFromCharacter(script.Parent.Parent) if plr.TeamColor ~= plr2.TeamColor then local hum = hit.Parent.Humanoid hum.Health = hum.Health - dmg.Value bullet:Destroy() else if hit.CanCollide == true then bullet:Destroy() else end end end end |
|
|
| Report Abuse |
|
|