# How to restart a level? (SOLVED)

**URL:** <https://forum.defold.com/t/how-to-restart-a-level-solved/16698>\
**Category:** Questions\
**Created:** [February 10, 2018, 5:49pm UTC](https://forum.defold.com/t/how-to-restart-a-level-solved/16698 "2018-02-10T17:49:20Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![decoded](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/decoded/32/7134_2.png) [@decoded](https://forum.defold.com/u/decoded)\
**Post date:** [February 10, 2018, 6:59pm UTC](https://forum.defold.com/t/how-to-restart-a-level-solved/16698/3 "2018-02-10T18:59:54Z")

</div>

The method I use is to send a restart message to my controller script that unloads the proxy and sets “self.restart = true”

Then check the boolean in the “proxy\_unloaded” message to reload it from there:

```lua
--check if proxy should reload itself
if message_id == hash("proxy_unloaded") then
  if self.restart == true and sender.fragment == hash("myproxy") then
    msg.post("/proxies#myproxy", "load")
    self.restart = false
  end
end

```

---

_[View the full topic](https://forum.defold.com/t/how-to-restart-a-level-solved/16698)._
