Hi Aziz, this may help:
https://youtu.be/ow_Lum-Agbs
In this video we'll walk though the setup and creation of a Finite State Machine (FSM) in Godot 4.
Finite State Machines are incredibly useful for managing simple states and transitioning between them. For this video we will look at an enemy with the states of wandering, following, and attacking. Then, we'll build the wander and follow states t...