Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I add spread to my BV gun?

Asked by 6 years ago

I tried using BodyAngularVelocity, but the direction of the bullet didn't change, it just rotated and kept going forward. Then I tried using math.random Vector3 for the velocity but that didn't go to well.

local BulletBV=Instance.new("BodyVelocity")
    BulletBV.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
    BulletBV.Velocity=Mouse.Hit.lookVector*400
    BulletBV.Parent=Bullet

So if you have any answers I gladly thank you!

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
BulletBV.Velocity = Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))

That will make it travel in a random direction within those perimeters. Add it to wherever the projectile is already going and you're set.

-- Phantom

0
Yeah now the bullet is shooting behind me xd Mr_MilkysButler 47 — 6y
Ad

Answer this question