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: Long subject is long

Previous Thread :: Next Thread 
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
13 Dec 2012 03:14 PM
if (temp ) and (human) and (Game.Players:GetPlayerFromCharacter(temp2) and (human.Health ​> 0) then

?

¤ † KMXD† ¤
Report Abuse
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:16 PM
It doesn't work.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
13 Dec 2012 03:17 PM
Remove the parenthesis next to "Game".

¤ † KMXD† ¤
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
13 Dec 2012 03:18 PM
remove ur face
Report Abuse
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:19 PM
Nope. The output is saying this:

16:17:47 - Workspace.Cl0ne.Follow:16: ')' expected near 'then'
Report Abuse
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:20 PM
So what do I do?
Report Abuse
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:23 PM
Bump
Report Abuse
jelly134 is not online. 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
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:27 PM
I did that.
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
13 Dec 2012 03:29 PM
And it says...
Report Abuse
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:31 PM
Workspace.Boss.Follow:16: unexpected symbol near 'if'
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
13 Dec 2012 03:35 PM
it says ray ray make me [ Content Deleted ] ray ray make me jay aye!
Report Abuse
MisterScripter is not online. MisterScripter
Joined: 24 Sep 2010
Total Posts: 702
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
MisterScripter is not online. MisterScripter
Joined: 24 Sep 2010
Total Posts: 702
13 Dec 2012 03:35 PM
If that don't work try it with the brackets.
Report Abuse
TheRealGlobotLeader is not online. TheRealGlobotLeader
Joined: 23 Feb 2011
Total Posts: 5106
13 Dec 2012 03:36 PM
Thanks, I figured it out.
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