# Adding a new object with the click of a button

**URL:** <https://community.thunkable.com/t/adding-a-new-object-with-the-click-of-a-button/2931259>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, help\
**Created:** [April 5, 2024, 5:00pm UTC](https://community.thunkable.com/t/adding-a-new-object-with-the-click-of-a-button/2931259 "2024-04-05T17:00:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fetele.codeaza4q](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@fetele.codeaza4q](https://community.thunkable.com/u/fetele.codeaza4q)\
**Post date:** [April 5, 2024, 5:00pm UTC](https://community.thunkable.com/t/adding-a-new-object-with-the-click-of-a-button/2931259/1 "2024-04-05T17:00:04Z")

</div>

Hello! I am trying to create a habit tracker and I want that when i press the “add activity” button for a new instance of "activity to appear below, but it seems that it only works when i click the button for the first time. also, when i try to enter text input in the appearance, the background text doesn’t disappear. if someone could help me i would be very grateful 🙂

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/f/df0f222c6087a0a2ef0da0f63f049f9c50a60637.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [April 5, 2024, 5:30pm UTC](https://community.thunkable.com/t/adding-a-new-object-with-the-click-of-a-button/2931259/2 "2024-04-05T17:30:22Z")

</div>

The clone button clones the **original** component. So `activity's Y` is always going to be the Y position of the original/first “activity” button.

What you need to do is to set a variable to `activity's Y` when the screen opens and then each time the button is clicked, increase that variable by activity’s Height. Then use the **variable** for the cloned button’s y value.

---

<div class="post-metadata">

**Author:** ![fetele.codeaza4q](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@fetele.codeaza4q](https://community.thunkable.com/u/fetele.codeaza4q)\
**Post date:** [April 5, 2024, 5:46pm UTC](https://community.thunkable.com/t/adding-a-new-object-with-the-click-of-a-button/2931259/3 "2024-04-05T17:46:42Z")

</div>

thank you so much for your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 11, 2024, 3:44pm UTC](https://community.thunkable.com/t/adding-a-new-object-with-the-click-of-a-button/2931259/5 "2024-07-11T15:44:08Z")

</div>

Closed on July 11, 2024, 3:44pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
