Turret rotation isn't working properly

Godot Version

Version 4.3

Question

` Hello, I just started using Godot last week. I’m trying to program a tank so that the turret points towards the cursor but lags behind while rotating. Most of the code works fine but it fritz’s out when trying to match the exact angle of the cursor, causing the sprite to split. And whenever I try to fix it It completely flips out. If you have any advice I’d appreciate it.

The script in question:

Your orientation is a mis-match of radians and degrees, maybe it will work better using rotation_degress - target

Make sure to paste code instead of screenshots

I’ve tried doing that, it usually breaks

Also I’ll keep that in mind for future