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 » Scripting Helpers
Home Search
 

Re: Editing ROBLOX's 15 minute FPS guns

Previous Thread :: Next Thread 
AIRX is not online. 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 is not online. AIRX
Joined: 03 May 2009
Total Posts: 5389
24 Aug 2012 09:59 AM
Anyone that can help :D?
Report Abuse
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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