AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 24 Aug 2012 09:46 AM |
Hi ROBLOX made a bunch of guns (well, stickmasterluke did) and the problem is that they only kill players on the other teams. I can't seem to find what part of the script does that though, or maybe I'm just misunderstanding. All the help I need is to really understand what's making it a team vs team gun, if that's understandable. I need it to be free for all.
Sorry that it's kind of long, but here are the parts that mention teams. Is it simply because it mentions teams that it requires teams for it to function, if that makes sense?
while not hitsolid do hitsolid=true local hit,pos=raycast(startpos,vec,range) if hit~=nil and hit.Parent~=nil then chr=sp.Parent local h=hit.Parent:FindFirstChild("Humanoid") if h~=nil then local p=game.Players:GetPlayerFromCharacter(h.Parent) if p~=nil then if p.TeamColor~=plr.TeamColor and h.Health>0 then --mentions teams finaldamage=damage if hit.Name=="Head" then finaldamage=finaldamage*headshotmultiplier elseif hit.Name=="Torso" then finaldamage=finaldamage--*1.1 end tagHumanoid(h,plr,hit.Name=="Head") h:TakeDamage(finaldamage) hittarget(hit.Parent) if piercing then hitsolid=false table.insert(targets[filteriloveyou]hit,hit.Parent) end end end elseif hit.Name=="Target" then hittarget(hit.Parent) if piercing then hitsolid=false table.insert(targets[filter:c]hit,hit.Parent) end end end
local missile=Instance.new("Part") missile.Name="Effect" missile.formFactor="Custom" missile.Size=Vector3.new(.1,.1,.1) missile.Material=Enum.Material.Plastic missile.BrickColor=plr.TeamColor --and again, does this do anything much? missile.Locked=true missile.TopSurface=0 missile.BottomSurface=0 missile.CFrame=CFrame.new(pos) missile.Transparency=1 missile.Anchored=true
local paint=Instance.new("Fire") paint.Color=plr.TeamColor.Color paint.SecondaryColor=plr.TeamColor.Color paint.Size=5 paint.Heat=0 paint.Parent=missile
That's all of it. Could I just replace the colour bits with BrickColor.random() ? |
|
|
| Report Abuse |
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
| |
|
| 24 Aug 2012 10:14 AM |
The line you pointed out near the top is preventing 'free for all'.
The line: "if p.TeamColor~=plr.TeamColor and h.Health>0 then"
Change that line to: if h.Health>0 then" |
|
|
| Report Abuse |
|
AIRX
|
  |
| Joined: 03 May 2009 |
| Total Posts: 5389 |
|
|
| 24 Aug 2012 10:14 AM |
well that was a lot simpler than I thought it would be. Thanks! |
|
|
| Report Abuse |
|