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

Bullet Falling Problem?

Asked by
KAAK82 16
10 years ago
shooting = true
bullet = Instance.new('Part', Workspace)
bullet.Name = 'Bullet'
bullet.BrickColor = BrickColor.new('Orange')
bullet.Anchored = false
bullet.CanCollide = false
bullet.Locked = true
bullet.Friction = 1
bullet.FormFactor = 'Custom'
bullet.Shape = 'Block'
bullet.Size = Vector3.new(1, 1, 3)
mesh = Tool.BulletMesh:clone()
mesh.Parent = bullet
bullet.CFrame = Tool.Barrel.CFrame
bullet.CFrame = CFrame.new(bullet.Position, Vector3.new(Tool.BarrelPos))
bullet.Velocity = bullet.CFrame.lookVector * BulletSpeed

this Chunk of Code seems to be making the Bullet Fall!

2 answers

Log in to vote
0
Answered by 10 years ago

Erm. I gather you're trying to make it so the bullet DOESN'T fall? I definitely know that in the LinkedRocketLauncher it uses BodyForce to keep the rocket floating. Try the same method.

0
Not BodyForce, BodyVelocity. HexC3D 830 — 10y
0
No. BodyVelocity moves it forwards, BodyForce counters the downwards momentum. SquirreIOnToast 309 — 10y
0
I need Realasticity... use my script check it KAAK82 16 — 10y
Ad
Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
10 years ago

Try using BodyVelocity it should work after this edit.

shooting = true
bullet = Instance.new('Part', Workspace)
bullet.Name = 'Bullet'
bullet.BrickColor = BrickColor.new('Orange')
bullet.Anchored = false
bullet.CanCollide = false
bullet.Locked = true
bullet.Friction = 1
bullet.FormFactor = 'Custom'
bullet.Shape = 'Block'
bullet.Size = Vector3.new(1, 1, 3)
 Tool.BulletMesh:clone().Parent = bullet
bullet.CFrame = Tool.Barrel.CFrame
y = Instance.new("BodyVelocity",bullet")
y.Velocity = Vector3.new(math.huge,math.huge,math.huge)

You can learn more about body velocity here

BodyVelocity

+1 if Helped and make sure that you tell the website I answered if this helped!

0
but do I have to use BodyVelocity? can the NaturalVelcoity not do the ork? KAAK82 16 — 10y
0
Use BodyVelocity HexC3D 830 — 10y
0
the Bullet still keeps falling... but once, it got up instead of don and that gave me an idea about making Shells :D but something is not right :/ KAAK82 16 — 10y

Answer this question