generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Anti Team Kill

Previous Thread :: Next Thread 
isaacsoccer is not online. isaacsoccer
Joined: 22 Jul 2010
Total Posts: 430
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
isaacsoccer is not online. isaacsoccer
Joined: 22 Jul 2010
Total Posts: 430
17 Nov 2015 08:27 PM
I will keep bumping until this is answered.

-Bump
Report Abuse
isaacsoccer is not online. isaacsoccer
Joined: 22 Jul 2010
Total Posts: 430
17 Nov 2015 08:35 PM
Bump
Report Abuse
LilMcManiac is not online. LilMcManiac
Joined: 31 Oct 2011
Total Posts: 2812
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image