[SOLVED] How to change name of cloned entity through script

how would i change change the name of an entity through code
var P = this.Player.clone();

this.Box.addChild(P);
P.setEulerAngles(-90, 0.24, -0.14);
P.rigidbody.teleport(-2, 0.6, 1);
P.addComponent("script");
P.script.create("playerHealth");

what would i type in

Maybe you can try P.name = “name”;

1 Like

it was that simple? lol thanks

Apparently if it works… :yum:

1 Like