# Clone follows when original stops

**URL:** <https://forum.makecode.com/t/clone-follows-when-original-stops/31066>\
**Category:** Help\
**Created:** [October 8, 2024, 9:24pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066 "2024-10-08T21:24:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![coolCoder](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coolCoder](https://forum.makecode.com/u/coolCoder)\
**Post date:** [October 8, 2024, 9:24pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066/1 "2024-10-08T21:24:44Z")

</div>

When I have multiple sprites with the same name and I tell that name to stop following me the original stops but clone keeps following. why?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 8, 2024, 9:26pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066/2 "2024-10-08T21:26:46Z")

</div>

@coolCoder can you share a link to your code?

Here’s a GIF that shows how to create a share link:

![how-to-share](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/dc8f06b5ddddeb153b8210fa09b1b1e17a18e55a.gif)

---

<div class="post-metadata">

**Author:** ![coolCoder](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coolCoder](https://forum.makecode.com/u/coolCoder)\
**Post date:** [October 8, 2024, 9:52pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066/3 "2024-10-08T21:52:00Z")

</div>

> **[Frog Hero](https://arcade.makecode.com/S95803-02147-27551-37570)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![coolCoder](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coolCoder](https://forum.makecode.com/u/coolCoder)\
**Post date:** [October 8, 2024, 9:52pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066/4 "2024-10-08T21:52:02Z")

</div>

I am talking about Robot\_2

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 8, 2024, 10:00pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066/5 "2024-10-08T22:00:51Z")

</div>

@coolCoder thanks! i think there’s a misunderstanding here about how variables work.

variables can only point to one thing at a time. every time you create a new robot, the Robot\_2 variable will be updated to point to the most recently created robot. that’s why you only see one sprite stopping when they get close.

if you want to have this behavior for _all_ of your robot sprites, then you want to take advantage of sprite kinds. for example, take this bit of code from your project:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/b/0b3b1fe0b4e27d1f84392733dcafffcf8306e0e0.png)

we can rewrite this using these two blocks:

- `array of sprites of kind ____ ` from the Sprites category
- `for value of ____ ` from the Loops category

like so:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/0/005dd2324291d46fba7b6b740237517dff11a0b7.png)

notice how instead of using the Robot\_2 variable, i’m using the value variable that is created by the for-of loop.

---

<div class="post-metadata">

**Author:** ![coolCoder](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@coolCoder](https://forum.makecode.com/u/coolCoder)\
**Post date:** [October 8, 2024, 10:25pm UTC](https://forum.makecode.com/t/clone-follows-when-original-stops/31066/6 "2024-10-08T22:25:28Z")

</div>

Thank you this was my first time using the forum
