Need help with knockback system

So I’m trying to make some sort of knockback system, but I’m not sure how to do it.
I can’t use look vector, because you can knocback any angle. So I somehow need to get the direction that the part got hit from, but I have no idea how to do so.

Sorry if this is a repost btw, I looked everywhere but couldn’t find my problem yet!

1 Like

To get the direction of the part’s hit origin you could use some code like this

local HitCFrame = CFrame.new(hittingObject.Position, hitObject.Position)
local HitVelocity = HitCFrame.LookVector * Speed
1 Like

Thanks!! I’ll test this out! (also wow that was a fast reply!!)

1 Like