Flinging a player away from a part in a certain direction

I just wanna fling the player in a cone-like radius away from the part as Vector3 velocity however i can’t seem to get the right xyz for it.
First image is from part point of view

second is from a different prescriptive.

Here’s the vector3 and the way i “fling” the player

local BodyVelocity = Instance.new("BodyVelocity", __CHARACTER.Torso)
BodyVelocity.Velocity = Vector3.new(5,2,5) * 10 -- THIS IS DIRECTION WHERE PLAYER GETS FLONG!!

The player flings away from the part in a right direction instead of a straight cone-radius, any ideas on how i can fix or use the right xyz values?

1 Like

Bump. Still looking for help will LookAt work best for this?

So if I’m correct similar to an explosion?


local direction = humanoidRootPart.Position - centerOfExplosion.Position
BodyVelocity.Velocity = direction.Unit * 10 

If you only want the XZ outwards movement you can modify the Y value of the direction.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.