|
| 13 Dec 2012 03:11 PM |
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 = 200 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("Torso") human = temp2:findFirstChild("Humanoid") if (temp ~= nil) and (human ~= nil) and (temp.Parent.Name ~= "Boss") and (human.Parent.Name ~= "Boss") or (temp.Parent.Name ~= "Cl0ne") and (human.Parent.Name ~= "Cl0ne") 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
|
|
|
| Report Abuse |
|
|
|
| 13 Dec 2012 03:14 PM |
if (temp ) and (human) and (Game.Players:GetPlayerFromCharacter(temp2) and (human.Health > 0) then
?
¤ † KMXD† ¤ |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Dec 2012 03:17 PM |
Remove the parenthesis next to "Game".
¤ † KMXD† ¤ |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Dec 2012 03:19 PM |
Nope. The output is saying this:
16:17:47 - Workspace.Cl0ne.Follow:16: ')' expected near 'then' |
|
|
| Report Abuse |
|
|
| |
|
| |
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
|
| 13 Dec 2012 03:26 PM |
| You haven't closed some brackets. Put a ')' before 'then'. |
|
|
| Report Abuse |
|
|
| |
|
jelly134
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 1137 |
|
| |
|
|
| 13 Dec 2012 03:31 PM |
| Workspace.Boss.Follow:16: unexpected symbol near 'if' |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2012 03:35 PM |
| it says ray ray make me [ Content Deleted ] ray ray make me jay aye! |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2012 03:35 PM |
if temp ~= nil and human ~= nil and temp.Parent.Name ~= "Boss" and human.Parent.Name ~= "Boss" or if temp.Parent.Name ~= "Cl0ne" and human.Parent.Name ~= "Cl0ne" and human.Health > 0 then
Take all the brackets out and I put an "if" right before temp.Parent.Name ~="Cl0ne" |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2012 03:35 PM |
| If that don't work try it with the brackets. |
|
|
| Report Abuse |
|
|
| |
|