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

How to use rocket propulsion to make parts go in a circle after targeting something?

Asked by 10 years ago

Is it possible to make a part using rocket propulsion go in a circle after targeting something? This is my rocket propulsion script for now.

velo = Instance.new("RocketPropulsion")
    velo.Target = Player.Character.Torso
    velo.Parent = q
    velo.MaxSpeed = 45 * 1.2
q.Parent = Player.Character
    velo:Fire()
    q.CFrame = Player.Character.Torso.CFrame * CFrame.new(math.random(-75, 75), math.random(-75, 75), math.random(-75, 75))

1 answer

Log in to vote
0
Answered by 10 years ago

Well orbiting has to do with moving to your relative down, and moving to your relative left or right at the same time. So I would use your script, but also add a BodyThrust object that moves it in its relative X direction. Just a suggestion to give you some ideas.

EDIT: And you'll need to make sure that the relative X thrust is equal to the relative Y thrust so that when the projectile goes down, it goes left or right at the same speed, therefore missing its target and trying again. This process should be repeated over and over again. This should make the projectile orbit a perfect circle.

0
Where could I learn BodyThrust? MrN00bReaper 30 — 10y
0
Whenever you want to learn about something, first go to the wiki page :D http://wiki.roblox.com/index.php?title=BodyThrust Octillerysnacker 115 — 10y
0
Can you give me an example of this or explain it more please? X thrust is equal to the relative Y thrust so that when the projectile goes down MrN00bReaper 30 — 10y
0
The x and y part because I tried and it went in a very weird motion, not going in a perfect circle, would BodyThrust.location matter also? MrN00bReaper 30 — 10y
0
Okay well I messed up, a simpler way is just to make the projectile miss its target, so it will try again, miss it again, and you don't even need a BodyThrust. Octillerysnacker 115 — 10y
Ad

Answer this question