|
| 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 |
|
|
|
| 12 Oct 2012 06:15 PM |
You didn't check if the humanoid was nil or not.
~xXTheRobotXx,Machination |
|
|
| Report Abuse |
|
|
| |
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
| |
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|