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: I need help on making a gun team kill.

Previous Thread :: Next Thread 
XzoI is online. XzoI
Joined: 26 Dec 2011
Total Posts: 1459
23 May 2015 07:33 AM
I am trying to change this part of a gun script to make it team kill. I looked on wiki, nothing helped or worked:
------------------------------------------------------------------------------------------


end
if humanoid.Health>0 then
local eplr=game.Players:playerFromCharacter(humanoid.Parent)
local plr=game.Players:playerFromCharacter(sp.Parent)
if eplr~=nil and plr~=nil then
if eplr.TeamColor~=plr.TeamColor or eplr.Neutral or plr.Neutral then
tagHumanoid(humanoid)
humanoid:TakeDamage(damage)
end
else
tagHumanoid(humanoid)
humanoid:TakeDamage(damage)
end
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 May 2015 07:34 AM
Hmm, I wonder...
Better learn to script.
Report Abuse
XzoI is online. XzoI
Joined: 26 Dec 2011
Total Posts: 1459
23 May 2015 07:41 AM
That's not an answer..
Report Abuse
XzoI is online. XzoI
Joined: 26 Dec 2011
Total Posts: 1459
23 May 2015 07:42 AM
b1
Report Abuse
XzoI is online. XzoI
Joined: 26 Dec 2011
Total Posts: 1459
23 May 2015 07:46 AM
b2
Report Abuse
BumpMachine is not online. BumpMachine
Joined: 11 May 2015
Total Posts: 399
23 May 2015 07:49 AM
ill give you one then

remove the teamcolor line and the end for it

Admin? http://www.roblox.com/Bumps-Admin-Commands-item?id=250209143
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
23 May 2015 07:51 AM
If you knew even the basics of scripting you'd realize the answer is staring you right in the face
Report Abuse
bluefrog53 is not online. bluefrog53
Joined: 05 Feb 2012
Total Posts: 766
23 May 2015 07:52 AM
What's sp exactly?
Report Abuse
TheCreationWorld is not online. TheCreationWorld
Joined: 02 Nov 2014
Total Posts: 568
23 May 2015 08:23 AM
if humanoid.Health>0 then
local eplr=game.Players:playerFromCharacter(humanoid.Parent)
local plr=game.Players:playerFromCharacter(sp.Parent)
if eplr~=nil and plr~=nil then

tagHumanoid(humanoid)
humanoid:TakeDamage(damage)

else
tagHumanoid(humanoid)
humanoid:TakeDamage(damage)
end

^^Fixed.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
23 May 2015 08:40 AM
Try: http://www.roblox.com/Forum/ShowPost.aspx?PostID=162392490

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
BumpMachine is not online. BumpMachine
Joined: 11 May 2015
Total Posts: 399
23 May 2015 08:41 AM
here is my code so-far

--------------------------
--BumpMachine's Admin v3--
--------------------------

local Owners = {} -- People who can use kick and ban.
local SuperAdmins = {} -- People who can not kick or ban but can use abusuve cmds.
local Admins = {} -- People who get NO abusive cmds, not even kill.

local Banned = {} -- Player's who cannot play.

local Prefix = ":" -- The prefix before command's.

-------------------
-- MAIN FUNCTIONS--
-------------------

--FindPlayer Function

local function FindPlayer(Speaker,Var)
local ReturnedPlayers = {}
for _,v in ipairs(game.Players:GetPlayers()) do
if v.Name:lower():sub(1,#Var) == Var:lower() then
return{v}
end
end
if Var:lower() == "me" then
return{Speaker}
elseif Var:lower() == "all" then
for _,v in pairs(game.Players:GetChildren()) do
table.insert(ReturnedPlayers,v)
end
elseif Var:lower() == "elders" then
for _,v in pairs(game.Players:GetChildren()) do
if v.AccountAge >= 80 then
table.insert(ReturnedPlayers,v)
end
end
elseif Var:lower() == "close" then
for _,v in pairs(game.Players:GetChildren()) do
if (v.Character.Torso.Position-Speaker.Character.Torso.Position).Magnitude < 50 then
table.insert(ReturnedPlayers,v)
end
end
elseif Var:lower() == "far" then
for _,v in pairs(game.Players:GetChildren()) do
if (v.Character.Torso.Position-Speaker.Character.Torso.Position).Magnitude < 100 then
table.insert(ReturnedPlayers,v)
end
end
elseif Var:lower() == "noobs" then
for _,v in pairs(game.Players:GetChildren()) do
if v.AccountAge < 25 then
table.insert(ReturnedPlayers,v)
end
end
elseif Var:lower() == "others" then
for _,v in pairs(game.Players:GetChildren()) do
if v.Name ~= Speaker.Name then
table.insert(ReturnedPlayers,v)
end
end
elseif Var:lower() == "guests" then
for _,v in pairs(game.Players:GetChildren()) do
if v.Name:match("Guest ") then
table.insert(ReturnedPlayers,v)
end
end
end
return ReturnedPlayers
end

--GetRank Function

local function GetRank(Name,Rank)
if Rank[Name] ~= nil then
return Rank[Name]
end
end

--Weld Function

local function Weld(Part1,Part2)
local Weld = Instance.new("Weld",Part1)
Weld.C0 = Part1.CFrame:inverse()
Weld.C1 = Part2.CFrame:inverse()
Weld.Part0 = Part1
Weld.Part1 = Part2
end

------------------
--CHATTED EVENTS--
------------------

local function ConnectOwner(OwnerPlayer)
OwnerPlayer.Chatted:connect(function(msg)

end)
end

local function ConnectSA(SAPlayer)
SAPlayer.Chatted:connect(function(msg)

end)
end

local function ConnectAdmin(AdminPlayer)
AdminPlayer.Chatted:connect(function(msg)

end)
end

---------------------
--CONNECTING EVENTS--
---------------------

game.Players.PlayerAdded:connect(function(Player)
if GetRank(Player,Banned) then Player:Kick()
elseif GetRank(Player,Owners) then ConnectOwner(Player) ConnectSA(Player) ConnectAdmin(Player)
elseif GetRank(Player,SuperAdmins) then ConnectSA(Player) ConnectAdmin(Player)
elseif GetRank(Player,Admins) then ConnectAdmin(Player) end
end)

Admin? http://www.roblox.com/Bumps-Admin-Commands-item?id=250209143
Report Abuse
BumpMachine is not online. BumpMachine
Joined: 11 May 2015
Total Posts: 399
23 May 2015 08:42 AM
uh wrong post..

Admin? http://www.roblox.com/Bumps-Admin-Commands-item?id=250209143
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
23 May 2015 08:42 AM
Dude what are you doing posting it here?

And why did TheCreation post his post in the returning section?

And why did chim post something the Hello World?

Something's creepy...

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
BattleFieldPwner is not online. BattleFieldPwner
Joined: 05 May 2013
Total Posts: 233
23 May 2015 09:31 AM
It's literally right in front of you..

"if eplr.TeamColor~=plr.TeamColor or eplr.Neutral or plr.Neutral then"

hm... I wonder?
Report Abuse
XzoI is online. XzoI
Joined: 26 Dec 2011
Total Posts: 1459
23 May 2015 10:47 AM
It breaks when I remove the line, 5th time
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