Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

5 comments

0

Where could I learn BodyThrust?

0

Whenever you want to learn about something, first go to the wiki page :D http://wiki.roblox.com/index.php?title=BodyThrust

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

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?

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.