Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I need body velocity to only shoot on x and z axis?

So I made a ki blast type move. I want it to shoot to where the mouse is but not on the y axis, only on the x,z axis. I tried this, but it's not working please help!

v.Velocity= head.lookVector*330 + Vector3.new(mousehit.lookVector.x,0,mousehit.lookVector.z)

1 comment

0

Try: Vector3.new(mousehit.p.x, 0, mousehit.p.z)

1 answer

✓ Accepted answer

Instead of multiplying by 330, multiply by a vector with the Y component as 0:

v.Velocity = head.lookVector * Vector3.new(330, 0, 330) + Vector3.new(mousehit.lookVector.x, 0, mousehit.lookVector.z)

This discussion is preserved as it was. New answers, comments, and votes are closed.