trouble accessing a object.

Solved

I want too find an object named lift thats a child of a child of a child of a child… on a different object then the one containing this script.

var targetObject : Transform;

Awake()
{
var lift = targetObject.Find("lift");
print(lift);
print(lift.position);
}

The first print gives me this in the console

So it found a transform named lift, right?
But when I want its position in the second print I get:

Nevermind I got it, I need to lay of the search path in find like

spawnpos= targetTeleport.Find(“lift_root/bone3/lift”).position;

Also am able to acces a script on the childs, no clue what i am doig different there then before tough :slight_smile:

This does not work:

	var spawnpos = targetTeleport.Find("lift_root/bone3/lift").position;

While this does:

	var spawnposObject = targetTeleport.Find("lift_root/bone3/lift");
	spawnPos = spawnposObject.position;