|
| 12 Aug 2013 01:46 PM |
| I don't know why, but this bot won't take any damage when I try to hurt it with a sword or any weapon that doesn't explode. http://www.roblox.com/alien-item?id=126221503 Can you tell me why the bot can't get killed? its max health is 75, yet some scipt inside of it must be changing that. |
|
|
| Report Abuse |
|
|
Gogeta
|
  |
| Joined: 25 Nov 2006 |
| Total Posts: 583 |
|
|
| 12 Aug 2013 01:49 PM |
| Either the Bot as rebegate regeneration script or the sword isn't inflicting damage upon the humanoid. |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 12 Aug 2013 01:52 PM |
Well
use this:
for i, v in pairs (hit.Parent:children()) do
if v:IsA("Humanoid") then v:TakeDamage(20) end end
Your damage scripts probably searches for 'Humanoid'
They couldve easily changed the name |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2013 03:25 PM |
| No I want to inflict damage onto the Bot with a sword or any weapon, but when I try to do that the Bot takes 0 damage, yet its max health is only 70. |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2013 03:33 PM |
| I don't see any reason why I can't kill it with non-explosives that break the joints |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2013 03:34 PM |
| I mean anything but explosives that break the joints |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 12 Aug 2013 03:38 PM |
| Is :BreakJoints() on the model what you're looking for? |
|
|
| Report Abuse |
|
|
|
| 12 Aug 2013 03:50 PM |
| Inside weapon scripts it looks for humanoid, Is the Alien's humanoid named Humanoid? |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Aug 2013 03:56 PM |
I found what is causing the trouble this script. Ill paste below, but what I found is changing the name from zombie to humanoid causes the thing to be killable which I want, but the problem is if there are 2 of them they begin attacking each other which they don't do if they're named zombie.
local larm = script.Parent:FindFirstChild("Left Arm") local rarm = script.Parent:FindFirstChild("Right Arm")
function findNearestTorso(pos) local list = game.Workspace:children() local torso = nil local dist = 1000 local temp = nil local human = nil local temp2 = nil for x = 1, #list do temp2 = list[x] if (temp2.className == "Model") and (temp2 ~= script.Parent) then temp = temp2:findFirstChild("Right Arm") human = temp2:findFirstChild("Humanoid") if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then if (temp.Position - pos).magnitude < dist then torso = temp dist = (temp.Position - pos).magnitude end end end end return torso end
human = script.Parent:findFirstChild("Humanoid") if human == nil then human = script.Parent:findFirstChild("Zombie") end
while true do wait(1) local target = findNearestTorso(script.Parent.Torso.Position) if target ~= nil then human:MoveTo(target.Position, target) human.TargetPoint = target.Position end
end
|
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 13 Aug 2013 01:12 AM |
Face EFFIN palm Replace zombie with Humanoid |
|
|
| Report Abuse |
|
|
| |
|
Voidion
|
  |
| Joined: 01 Aug 2011 |
| Total Posts: 2668 |
|
|
| 13 Aug 2013 01:23 AM |
| ... or you can make it so that the sword searches for "zombie"... |
|
|
| Report Abuse |
|
|
jd678
|
  |
| Joined: 18 Apr 2008 |
| Total Posts: 11529 |
|
|
| 13 Aug 2013 01:28 AM |
I think he should do what Void said
it is also anti-team kill
two birds one stone |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 13 Aug 2013 03:59 PM |
Or ye lal
but it would only affect zombies |
|
|
| Report Abuse |
|
|