Hard to say without some code to look at. As the error says, you’re trying to call a move_toward() function on a bool type. And, since a bool type doesn’t have such a function, you get that error.
You’ll need to post some code for additional input.
jgodfrey | 2023-03-15 23:37
I have tried attaching a image but it doesn’t show up. So I use Hyperlinks instead.enter link description here
So, in Godot 3.x, move_and_slide() returned a Vector2. However, in Godot 4, move_and_slide returns a bool. So, while your knockback variable started out as a Vector2, at this line of code, it is replaced with a bool.
knockback = move_and_slide()
Assuming you’re not interested in the bool return value of move_and_slide, the simple fix is to simply change the above to: