# Cloned Light doesn't Receive its Assigned Name

**URL:** <https://forum.babylonjs.com/t/cloned-light-doesnt-receive-its-assigned-name/25668>\
**Category:** Bugs\
**Created:** [November 30, 2021, 10:52pm UTC](https://forum.babylonjs.com/t/cloned-light-doesnt-receive-its-assigned-name/25668 "2021-11-30T22:52:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [November 30, 2021, 10:52pm UTC](https://forum.babylonjs.com/t/cloned-light-doesnt-receive-its-assigned-name/25668/1 "2021-11-30T22:52:33Z")

</div>

Repro: [Babylon.js Playground](https://playground.babylonjs.com/#GDAKUL)  
As one may see, all cloned lights have the same name (the name of the light from which they are cloned).

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/9/4962c06ad8b5f59f2e9a2361ed25130c1c02e04a.png)

Solution (tested and works in local environment):  
Add to the **light.ts** (after line 590) the same condition for the `name` as for the `newParent`

```auto
        if (name) {
            clonedLight.name = name;
        }

```

> <https://github.com/BabylonJS/Babylon.js/blob/master/src/Lights/light.ts#L584>

Should I make a PR?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [November 30, 2021, 11:54pm UTC](https://forum.babylonjs.com/t/cloned-light-doesnt-receive-its-assigned-name/25668/2 "2021-11-30T23:54:40Z")

</div>

Please do 🙂  
Highly appreciated!

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [December 1, 2021, 3:23am UTC](https://forum.babylonjs.com/t/cloned-light-doesnt-receive-its-assigned-name/25668/3 "2021-12-01T03:23:09Z")

</div>

PR made!

> <https://github.com/BabylonJS/Babylon.js/pull/11559>
>
> See https://forum.babylonjs.com/t/cloned-light-doesnt-receive-its-assigned-name/…25668

UPD. Merged, so I mark this as solution 🙂

UPD 2. It works 🙂

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/f/af9e31cb695b635b1cb92f999b8fa5b3b443af21.png)
