Help with drift implementation

I have made a drift mechanic for my racing game,
it works fine for the player,
but it refuses to properly work when applied for the bot!

GIF of the problem:

Screencastfrom2024-12-2001-06-14-ezgif.com-optimize

EVENTS: