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

Missile point to a cframe position?

Asked by 10 years ago

I am making a rocket, everything works but it doesnt point towards the part I want :d

maxspeed = 200
print("Launching")
bv = Instance.new("BodyVelocity")
bg = Instance.new("BodyGyro")
for i = 1, 5 do
smoke = Instance.new("Smoke")
smoke.Size = 10
smoke.Color = BrickColor.new("Dark stone grey").Color
smoke.Parent = script.Parent.Parent.Exhaust
smoke.Opacity = 1
smoke.RiseVelocity = 2
wait(.1)
end
bv.Parent = script.Parent
bg.Parent = script.Parent
bg.maxTorque = Vector3.new(0,0,0)
bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
script.Parent.Weld:remove()
for i = 1, maxspeed do
    print(i)
bv.velocity = script.Parent.CFrame.lookVector*i
wait(.01)
end
script.Fly.Disabled = false
print("MaxSpeed")
print("Pointing")
bg.maxTorque = Vector3.new(10000,10000,10000)
bg.cframe = script.Position.Value

Answer this question