# making a script wait for x seconds

**URL:** https://discussions.unity.com/t/making-a-script-wait-for-x-seconds/500619
**Category:** Scripting
**Tags:** Scripting
**Created:** [March 24, 2013, 10:41pm UTC](https://discussions.unity.com/t/making-a-script-wait-for-x-seconds/500619 "2013-03-24T22:41:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![carbondudeoxide](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@carbondudeoxide](https://discussions.unity.com/u/carbondudeoxide)
#### Post date: [March 24, 2013, 10:41pm UTC](https://discussions.unity.com/t/making-a-script-wait-for-x-seconds/500619/1 "2013-03-24T22:41:18Z")

</div>

hello, i am currently doing some scripting with transformations and i would like my script to hang or wait for x seconds and then continue.

this is the current script that i ahve and it works as a co routine but i would like to make it so it holds the script here while its doing it.

```auto
	private IEnumerator MoveChevron(){
		for(int i = 0; i < 5; i++) {
			chevron7.transform.Translate(-Vector3.up * 0.015f);
			yield return new WaitForSeconds(0.01f);
		}
		yield return new WaitForSeconds(10);
		for(int i = 0; i < ; i++) {
			chevron7.transform.Translate(Vector3.up * 0.015f);
			yield return new WaitForSeconds(0.01f);
		}
	}

```

i may just be in the mind set of the old engine that i used which used Lua s its language which had a very nice wait() which did exactly want im trying to do now just without coroutines 🙂

---

<div class="post-metadata">

### Author: ![EliteMossy](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/elitemossy/32/470831_2.png) [@EliteMossy](https://discussions.unity.com/u/EliteMossy)
#### Post date: [March 24, 2013, 10:45pm UTC](https://discussions.unity.com/t/making-a-script-wait-for-x-seconds/500619/2 "2013-03-24T22:45:06Z")

</div>

not really possible to halt Update, etc of a script. If you need finer controls, consider using InvokeRepeating and Invoke and yield the return of a coroutine
