Directional knockback with raycasting

if there is a simpler solution to this please tell me

Basically, what my idea was is to raycast between the explosion origin and the player character, and then get the direction with some kind of lookvector thing, and then use that vector in a body force to send the player in that direction

I have since found this is not possible

What should I do instead? Is this even possible? If not, what is an alternate solution? Is there a much much simpler way to do this I should be doing?

You can simply just find the displacement between the explosion’s center and the player and use that as the directional vector
Something like

local force: number = 500
local dir: Vector3 = (player.CFrame.Position - explosion.CFrame.Position).Unit
player:ApplyImpulse(dir * force)
1 Like