How do I configure this Body Position?

Hello, so basically, im working on this script where it plays an animation and theres this animation event where it knocksback your opponent backwards but when I made the bodyposition to where it sends them back infront of you, it goes backwards instead and no matter what direction I am looking at it sends then the same direction when I want it to send the opponent backwards to where I am facing. Here is the script:

local BP = Instance.new("BodyPosition",ehumrp)
					BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
					BP.P = 1000
					BP.D = 500
					BP.Position = humrp.CFrame.LookVector * 10

does anyone have a solution?

2 Likes

Z-axis is always inverted with LookVectors. Use -10 to make it go forward, and 10 to make it go backwards.

1 Like

you need to add this onto the position of the victim whos getting knocked back, otherwise he will get put 10 studs from the world origin position, so victim.Position + LookVector * 10

humrp.CFrame.LookVector * CFrame.new(0, 0, 10)

This works with vector3 now cframe

Doesnt help, still does the same goes the same direction

Buddy, Thats not how u use lookvector, lookvector corresponds with cframe its not its own thing

What about this?

humrp.CFrame + (humrp.CFrame.LookVector * Vector3.new(0, 0, 10))
or
humrp.CFrame + (humrp.CFrame.LookVector * CFrame.new(0, 0, 10))

1 Like

Nope, besides I just found the solution.

I’ve come across this problem as well. How did you solve the issue?