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

How can I make it so my bullet shoots in the same direction every time?

Asked by 5 years ago

So the issue here is sometimes the bullet will be facing the right direction but when I look up and down or side to side sometimes, it will not be facing the right direction How it Looks

Here's my script. Any help would be appreciated.

 local bullet = Instance.new("Part", workspace)
    bullet.BrickColor = BrickColor.new("New Yeller")
    bullet.Material = Enum.Material.Neon
    bullet.Size = Vector3.new(0.1,0.1,.4)
    bullet.Parent = workspace
    bullet.CFrame = CFrame.new(flash.Position)

    local bv = Instance.new("BodyVelocity")
    bv.MaxForce = Vector3.new(1e8,1e8,1e8)
    bv.Velocity = mouse.hit.lookVector * 100
    bv.Parent = bullet

    game:GetService("Debris"):AddItem(bullet, 3)

Not to sure as to why it does this but it does this.

Answer this question