caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Sep 2016 07:24 PM |
pastebin link: 3KzXqDr5
This line: print('bleh '..torso.Parent.Name)
For some reason will print 'bleh Zombie'
Even though I ensure that the humanoid object can only be named 'Humanoid' or 'AI'?
The models named 'Zombie' have a 'Zombie' named humanoid.
This causes the zombie to "chase itself" and therefore he doesn't actually move.
Please help |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 25 Sep 2016 07:33 PM |
| #################################################################################### |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 25 Sep 2016 07:34 PM |
| #################################################### |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 25 Sep 2016 07:35 PM |
Wow, props to whoever made the filter. Not even gonna say anything anymore.
R$10,495 |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Sep 2016 07:40 PM |
| You could always make a pastebin because of these stupid filters |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
| |
|
|
| 25 Sep 2016 07:52 PM |
| Did you mean torso.Parent.Humanoid.Name? |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Sep 2016 07:55 PM |
For the printing part?
No, I was testing to see which model it was detecting as target.
I also did one that printed the 'human' variable's name, and that returned 'Humanoid'
Which is weird since it'll print 'Humanoid' for the humanoid and 'Zombie' for the model, considering that the zombie's humanoid part is named 'Zombie' |
|
|
| Report Abuse |
|
|
|
| 25 Sep 2016 08:05 PM |
Lol
torso.Parent.Name
that is the name of the parent of the torso
AKA Zombie |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Sep 2016 08:08 PM |
I know that the torso.Parent.Name is zombie.
It shouldn't be though.
Because all the models in my game that are named 'Zombie' do not have an object named "Humanoid" in them.
So it should either print my name, or an AI in my game that has a Humanoid value.
For some reason it detects itself, and decides to chase itself |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Sep 2016 08:29 PM |
Please help?
In case I wasn't clear.
This script is in a zombie, the zombie for some reason decides to chase zombies (inlcuding itself) |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 25 Sep 2016 08:40 PM |
Plz help
No matter what I try the zombie still chases other zombies |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 26 Sep 2016 04:41 PM |
Doesn't matter if there is a humanoid or not. Torsos parent is always The Character (Or the name of the model)
R$10,495 |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 Sep 2016 04:51 PM |
that is very odd you'll have to use something other than the name of humanoid to differentiate then, must be some kind of stupid roblox glitchiness id suggest using getplayerfromcharacter, but it seems like some AIs should be targetted |
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 26 Sep 2016 05:32 PM |
@lul It does matter if there is a humanoid or not. because my script will only return the torso if there is a humanoid class in the torso's parent.
I fixed the issue though.
All I did was set 'TempHum' to nil every time the for loop runs. |
|
|
| Report Abuse |
|
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
|
| 26 Sep 2016 06:48 PM |
*facepalm*
Not even gonna try anymore. Someone else help him understand.
R$10,495 |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2016 06:51 PM |
| ive opened the script thingy out but how to spawn humanoid |
|
|
| Report Abuse |
|
|
| |
|
lululukas
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1043 |
|
| |
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 26 Sep 2016 10:05 PM |
"Not even gonna try anymore. Someone else help him understand."
How do I not understand?
You do not understand what I am saying.
You were going on about how it doesn't matter if there is a humanoid or not. And I was saying that it does. What am I not understanding? |
|
|
| Report Abuse |
|
|
TGazza
|
  |
| Joined: 16 Jan 2008 |
| Total Posts: 242 |
|
|
| 27 Sep 2016 12:40 AM |
in that function i would change this bit:
for i,v in pairs(area)do if v:IsA'Model' and v:FindFirstChild('Torso')then for _,a in pairs(HUM)do local t = v:FindFirstChild(a) if t~=nil and t:IsA'Humanoid'then TempHum = t end end
to check to see if v equal its self, if it is then dont count it in your varable EX:
for i,v in pairs(area)do if v:IsA'Model' and v ~= script.Parent and v:FindFirstChild('Torso')then for _,a in pairs(HUM)do local t = v:FindFirstChild(a) if t~=nil and t:IsA'Humanoid'then TempHum = t end end
tell me if that fixes your problem if not then i could re-write the function to do what your looking for
|
|
|
| Report Abuse |
|
|
caca50
|
  |
| Joined: 10 Jul 2011 |
| Total Posts: 2037 |
|
|
| 27 Sep 2016 07:46 PM |
| I ensured v is not itself, and I also set 'TempHum' to nil every time the for loop ran. I fixed it. |
|
|
| Report Abuse |
|
|