Attaching Camera and objects to bone

I created a bone that is animated along a path in 3ds max.
i have brought it into playcanvas and can see animating. I want to attach a camera and other entites to this bone. I am trying to do this with this script

var CarInit = pc.createScript('carInit');

CarInit.attributes.add('AnimationBone', {
    type:'entity'
});

CarInit.attributes.add('Camera', {
    type:'entity'
});


CarInit.extend({
    
    initialize: function(){
        
        console.log(this.AnimationBone.findByName("Bone001"));
        
        this.AnimationBone.findByName("Bone001").addChild(this.Camera);
    }
    
});

The issue has when i run it i get
GraphNode is already parented
AnimationBone does not even have any children and camera has no parent

The camera would have Root entity as the parent. Use reparent on the camera entity instead of addChild

https://developer.playcanvas.com/en/api/pc.Entity.html#reparent

That works great thank you @yaustar

now is there a way to have the camera always pointed at the path as if it follows the path too? Do i have to create a second bone and use a look at or something

I got it by creating an entity on the animation and of setting the current time of that of set to the other animation.
then a simple lookat script for the camera to look at that of set object

@kdarius Hey! How did you animated bone along a path in 3ds max? Is it Path Deform modifier or Path Constraint controller? And how do you export animation? Thanx!