# Physics error

**URL:** <https://forum.kirupa.com/t/physics-error/215138>\
**Category:** Uncategorized\
**Created:** [February 4, 2007, 8:44pm UTC](https://forum.kirupa.com/t/physics-error/215138 "2007-02-04T20:44:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamZZ](https://avatars.discourse-cdn.com/v4/letter/a/e19adc/32.png) [@AdamZZ](https://forum.kirupa.com/u/AdamZZ)\
**Post date:** [February 4, 2007, 8:44pm UTC](https://forum.kirupa.com/t/physics-error/215138/1 "2007-02-04T20:44:06Z")

</div>

im back and now im working in another game xD but this time its halo.

i have some problems with my physics \>.\< heres the code

```auto

onClipEvent (load) {
	down = false;
	inair = false;
	falling = false;
	jumping = false;
	speed = 0;
}
onClipEvent (enterFrame) {
	if (Key.isDown(Key.SPACE)) {
		jumping = true;
	}
	if (jumping) {
		if (!inair) {
			if (!falling) {
				speed += 0.85;
				this._y -= speed;
				if (speed>15) {
					falling = true;
				}
			} else {
				speed += 0.90;
				this._y += speed;
				falling = true;
				if (_root.ground, hitTest(this)) {
					speed = 0;
					falling = false;
					inair = false;
					jumping = false;
				}
			}
		}
	}

```

when i press space i jump then when im starting to go down it stops and im not even near the ground :S can someone pls tell me whats wrong ?
