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
 

FindFirstChild("Humanoid")

Previous Thread :: Next Thread 
BornLeader1 is not online. BornLeader1
Joined: 02 Jun 2011
Total Posts: 1795
12 Oct 2012 06:11 PM
function ot(hit)
if debounce == 0 then
debounce = 1
print("function set")
if hit.Parent:findFirstChild("Humanoid") then
print("Found error")
print("ok...")
nplayer = game.Players:GetPlayerFromCharacter(hit.Parent)
etc.
What is wrong with that? It won't print "Found error" in output.
Report Abuse
Machination is not online. Machination
Joined: 04 Sep 2012
Total Posts: 327
12 Oct 2012 06:15 PM
You didn't check if the humanoid was nil or not.

~xXTheRobotXx,Machination
Report Abuse
BornLeader1 is not online. BornLeader1
Joined: 02 Jun 2011
Total Posts: 1795
12 Oct 2012 08:20 PM
Um, dude, no.
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
12 Oct 2012 08:27 PM
No connection line?
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
12 Oct 2012 08:30 PM
script.Parent.Hit:connect(function (hit)
if debounce == 0 then
debounce = 1
print("function set")
if hit.Parent:findFirstChild("Humanoid") then
print("Found error")
print("ok...")
nplayer = game.Players:GetPlayerFromCharacter(hit.Parent)
Report Abuse
Smakdown21 is not online. Smakdown21
Joined: 15 Dec 2009
Total Posts: 1552
12 Oct 2012 10:11 PM
Any un-anchored block that touches the block that activates the script will work. So you have to check to see if it is a ROBLOXian that touches it. Also, if the ROBLOXian's hat or tool touches the block then to find the humanoid you have to go hit.Parent.Parent.
Report Abuse
Machination is not online. Machination
Joined: 04 Sep 2012
Total Posts: 327
13 Oct 2012 07:56 AM
"Um, dude, no."

Um, dude, yes.

If it isn't a ROBLOXian touching it, the script disconnects.

~xXTheRobotXx,Machination
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