# Getting arguments from Area2D

**URL:** <https://forum.godotengine.org/t/getting-arguments-from-area2d/148066>\
**Category:** Help\
**Tags:** 2d, gdscript, game, godot-4\
**Created:** [December 4, 2026, 11:12am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066 "2026-12-04T11:12:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![damny12](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@damny12](https://forum.godotengine.org/u/damny12)\
**Post date:** [December 4, 2026, 11:12am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/1 "2026-12-04T11:12:28Z")

</div>

### Godot Version

4.7.2

### Question

I am making a game where you have to stay on a track, and I want to detect when the player has exited the area that is considered the track so that I can make them lose, however I haven’t been able to find out how to implement this properly.

How do I get the Node that exited the track?

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [December 4, 2026, 11:16am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/2 "2026-12-04T11:16:58Z")

</div>

Use the `body_exited` signal.

> **[Area2D](https://docs.godotengine.org/en/stable/classes/class_area2d.html#class-area2d-signal-body-exited)**
>
> area\_entered(area: Area2D) 🔗 | Inherits: CollisionObject2D\< Node2D\< CanvasItem\< Node\< Object A region of 2D space that detects other CollisionObject2D s entering or exiting it. Description: Area2D is a region of 2D s...

---

<div class="post-metadata">

**Author:** ![damny12](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@damny12](https://forum.godotengine.org/u/damny12)\
**Post date:** [December 4, 2026, 11:37am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/3 "2026-12-04T11:37:35Z")

</div>

How do I get the body that exited? I know the signal exists, but how do i find what exited?

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [December 4, 2026, 11:45am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/4 "2026-12-04T11:45:08Z")

</div>

Please check the link I gave you.

 ![image](https://forum.godotengine.org/uploads/default/original/3X/9/0/900d61e3628fe55e6eb4e9618bddcbb39efc5c75.png)

---

<div class="post-metadata">

**Author:** ![damny12](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@damny12](https://forum.godotengine.org/u/damny12)\
**Post date:** [December 4, 2026, 11:55am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/5 "2026-12-04T11:55:12Z")

</div>

This still doesn’t explain how to use the body arguement. How do I get the body arguement? All you’re doing is sending me a link to something I’ve said I already looked at. At the very least can you show an example of code using the argument?

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [December 4, 2026, 11:57am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/6 "2026-12-04T11:57:10Z")

</div>

The `body_exited` signal gives you a Node2D as an argument. That is the body that exited the area. I’m not sure what else it is you need, could you explain why the `body` the signal gives you isn’t enough?

---

<div class="post-metadata">

**Author:** ![FrozenFried](https://forum.godotengine.org/user_avatar/forum.godotengine.org/frozenfried/32/56454_2.png) [@FrozenFried](https://forum.godotengine.org/u/FrozenFried)\
**Post date:** [December 4, 2026, 11:58am UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/7 "2026-12-04T11:58:32Z")

</div>

That’s very spoon feeding.

```auto
func _on_body_exited(body: Node2D) -> void:

```

The body is **The** arg on the func. The `body!`

---

<div class="post-metadata">

**Author:** ![damny12](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@damny12](https://forum.godotengine.org/u/damny12)\
**Post date:** [December 4, 2026, 12:04pm UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/8 "2026-12-04T12:04:03Z")

</div>

This post was flagged by the community and is temporarily hidden.

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [December 4, 2026, 12:06pm UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/9 "2026-12-04T12:06:17Z")

</div>

Nobody is condescending, but giving us very little information to go off of means that it’s very difficult to give help. I cannot see your project or know how far along you are with godot specific knowledge.

It often helps to include examples that you have tried, and explain why they didn’t work, instead of vaguely explaining that “I tried something and it didn’t work.”

---

<div class="post-metadata">

**Author:** ![damny12](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/d/bc79bd/32.png) [@damny12](https://forum.godotengine.org/u/damny12)\
**Post date:** [December 4, 2026, 12:07pm UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/10 "2026-12-04T12:07:17Z")

</div>

What do you want me to say? I didn’t get a single error message, the function just never happened in the first place.

---

<div class="post-metadata">

**Author:** ![tibaverus](https://forum.godotengine.org/user_avatar/forum.godotengine.org/tibaverus/32/43649_2.png) [@tibaverus](https://forum.godotengine.org/u/tibaverus)\
**Post date:** [December 4, 2026, 12:07pm UTC](https://forum.godotengine.org/t/getting-arguments-from-area2d/148066/11 "2026-12-04T12:07:33Z")

</div>

Please check the following post:

> [@Posting guidelines in #Help channel](https://forum.godotengine.org/t/posting-guidelines-in-help-channel/138565):
>
> Search for the answer Before asking a question, check [Godot Docs](https://docs.godotengine.org/en/stable/) and use the [Forum Search functionality](https://forum.godotengine.org/search) to make sure your question hasn’t been answered or there isn’t an ongoing discussion on that topic already. If you don’t know where to start, try here: [Getting started](https://docs.godotengine.org/en/stable/getting_started/introduction/), [Your first 2D game](https://docs.godotengine.org/en/stable/getting_started/first_2d_game/), [Your first 3D game](https://docs.godotengine.org/en/stable/getting_started/first_3d_game/). Create a good post Click on each point to expand. play_button 1. Write a good topic titleplay_button 2. Use the templateplay_button 3. Format your code Describe your problem Explain the problem you’re having in deta…
