# Question with temporary variables and \*goto\_scene

**URL:** <https://forum.choiceofgames.com/t/question-with-temporary-variables-and-goto-scene/50906>\
**Category:** ChoiceScript Help\
**Created:** [January 30, 2019, 10:09pm UTC](https://forum.choiceofgames.com/t/question-with-temporary-variables-and-goto-scene/50906 "2019-01-30T22:09:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eos](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eos/32/109207_2.png) [@Eos](https://forum.choiceofgames.com/u/Eos)\
**Post date:** [January 30, 2019, 10:09pm UTC](https://forum.choiceofgames.com/t/question-with-temporary-variables-and-goto-scene/50906/1 "2019-01-30T22:09:09Z")

</div>

Hi, I’m just wondering if local variables persist even if you run multiple iterations of a scene. Here’s an example:

I have scenes “scene1” and “scene2.” Inside scene1, I have a local variable called “variable1.”

If I \*temp variable1 10, then use \*goto\_scene scene2, and then return to scene1, will variable1 still be 10? Or will I have to declare it again?

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [January 30, 2019, 10:17pm UTC](https://forum.choiceofgames.com/t/question-with-temporary-variables-and-goto-scene/50906/2 "2019-01-30T22:17:23Z")

</div>

If you use \ ***gosub\_scene** , and an appropriate \ ***return** , then the value should persist. With \ ***goto\_scene** it will not.
