The states' callback functions should be without the leading underscore. For example, unhandled_input, and not _unhandled_input. Otherwise, Godot calls the virtual _unhandled_input function on every node that defines it, so it calls it on all of your states one after the other.
I was able to toggle between run and idle only by switching
on run state to
If both the Idle and Run state scripts have the same keystroke for
hasn't transition between my states, different actions work fine and correctly change my state. Do you know why this could be?
I can't know like that, there's certainly a line of code that's incorrect. If you need me to look at it, could you upload the project as a .zip archive and link to it here?