# Lua script: what happen when a script fail?

**URL:** <https://discuss.cubepilot.org/t/lua-script-what-happen-when-a-script-fail/9308>\
**Category:** Uncategorized\
**Created:** [27 July 2022 07:54 UTC](https://discuss.cubepilot.org/t/lua-script-what-happen-when-a-script-fail/9308 "2022-07-27T07:54:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike](https://discuss.cubepilot.org/user_avatar/discuss.cubepilot.org/mike/32/5554_2.png) [@Mike](https://discuss.cubepilot.org/u/Mike)\
**Post date:** [27 July 2022 07:54 UTC](https://discuss.cubepilot.org/t/lua-script-what-happen-when-a-script-fail/9308/1 "2022-07-27T07:54:57Z")

</div>

Hello everyone,

I have a question that can be a absurd, but what happen when a **lua script fail**?  
From what I saw, **it will restart the script core/engine**. However, if this script controls a mission (for example it controls the velocity of the vehicle), **what will happen if the execution fails in flight**? Will it crash ?

Thank you in advance and have a nice day all 😉
