I created a while loop in my external events, but when i open the game and press the play button (where condition should become true) it literally stops and when i try to close it, it takes a while to do it.
Probably because its an infinite loop. You really don’t need to use a while loop for this. Also if all you’re trying to do is disable the object rotation, you can easily toggle this in the path finding behavior menu.
The way a while loop works is that it repeats the event over and over until the condition is no longer true.
With your while loop, it starts once gamestarted = 1. However, because you do not change the value of gamestarted within the while event (or in any of it’s subevents), it will always remain 1 and the while event will keep repeating non-stop. This means GDevelop does not get out of the loop (aka infinite looping) and no other event is ever actioned.