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
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 23 May 2015 07:34 AM |
Hmm, I wonder... Better learn to script. |
|
|
| Report Abuse |
|
|
XzoI
|
  |
| Joined: 26 Dec 2011 |
| Total Posts: 1459 |
|
| |
|
XzoI
|
  |
| Joined: 26 Dec 2011 |
| Total Posts: 1459 |
|
| |
|
XzoI
|
  |
| Joined: 26 Dec 2011 |
| Total Posts: 1459 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 23 May 2015 08:42 AM |
uh wrong post..
Admin? http://www.roblox.com/Bumps-Admin-Commands-item?id=250209143 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 26 Dec 2011 |
| Total Posts: 1459 |
|
|
| 23 May 2015 10:47 AM |
| It breaks when I remove the line, 5th time |
|
|
| Report Abuse |
|
|