Having issues with knockback

Godot Version

4.3

Question

I’ve been having issues getting knockback working, I’ve never worked on it in games before so its confusing me bad for some reason. Been using a node based state machine that has components for stuff like hitboxes and hurtboxes but I don’t understand how to do knockback. Watched through the heartbeast tutorial and couldn’t figure it out because its from godot 3.2 and a lot of the functions just don’t work anymore, and I’ve also looked through a bunch of posts and for some reason it just isn’t clicking. I just want a very generic system that hits the player back when they are hit by an attack or enter a hitbox in general like for spikes and stuff, but I’m having trouble figuring out how to get stuff like the current velocity of the player and the hitbox its interacting with, the direction difference so if you’re hit from the right it launches you left, just super lost, sorry for the big post, just very confused. If you need code let me know but I don’t have any knockback code in there currently so I doubt it would be too useful.