Reference API Roblox

Engine API

Website

Related

Reference API Roblox

RocketPropulsion

Applies a force so that a part follows and faces another part.

This class is deprecated. It exists only for backward compatibility, and should not be used for new work. LineForce should be used instead.
Tags: [Deprecated]

Member index 16

HistoryMember
553CartoonFactor: float
553MaxSpeed: float
553MaxThrust: float
553MaxTorque: Vector3
553Target: BasePart
553TargetOffset: Vector3
553TargetRadius: float
553ThrustD: float
553ThrustP: float
553TurnD: float
553TurnP: float
573Abort(): null
573Fire(): null
573fire(): null
462ReachedTarget()
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

The RocketPropulsion object applies a force on a part so that it both follows and faces a target part. It acts like a hybrid of BodyPosition and BodyGyro. Unlike other BodyMovers, a RocketPropulsion must be instructed to begin applying a force: call Fire to start, or call Abort to stop.

You can detect when the part reaches its target using the ReachedTarget event, which fires once the part is within the TargetRadius of the Target.

RocketPropulsion has the most physics-related properties out of all the BodyMovers. It is helpful to separate the properties out into categories based on what they control:

Remember, you don't need to use both the translational and rotational force features of a RocketPropulsion: by setting MaxThrust to 0, you can make a part just face the target without having it follow the target around (consider also using a BodyPosition in addition). Similarly, by setting MaxTorque to (0, 0, 0), you can have a part simply follow another object without facing it (use a BodyGyro if you want the object to maintain a specific orientation).

History 64

Members 16

Abort

Parameters (0)
No parameters.
Returns (1)
null

Causes the Rocket to stop moving towards its target, making it fall.

History 3

CartoonFactor

TypeDefault
float0.699999988

The CartoonFactor property determines the tendency of the part to face the Target. By default, this property is set to 0.7. If set to 0, the part will make no effort to face the target.

History 4

Fire

Parameters (0)
No parameters.
Returns (1)
null

Causes the rocket to fly towards Target.

History 3

MaxSpeed

TypeDefault
float30

The MaxSpeed property determines the upper limit of the velocity at which the part will move toward the Target. A RocketPropulsion will apply a force to decelerate a part if it exceeds this speed limit.

History 4

MaxThrust

TypeDefault
float4000

The MaxThrust property determines the upper limit of the thrust that may be exerted to move the part. Parts or assemblies that have high mass will require more thrust in order to remain airborne, and thus track the Target.

History 4

MaxTorque

TypeDefault
Vector3400000, 400000, 0

The MaxTorque property determines the upper limit on the amount of torque that may be exerted in order to rotate the part towards the Target. It functions similarly to BodyGyro.MaxTorque.

History 4

ReachedTarget

Parameters (0)
No parameters.

Fired when the Rocket comes within TargetRadius of the Target. This is used to make the rocket work, such as make an explosion when it flies near the Target.

History 2

Target

TypeDefault
BasePart

The Target property determines the object towards which the RocketPropulsion will exert force/torque. If set to nil, the TargetOffset will be used instead.

History 5

TargetOffset

TypeDefault
Vector30, 0, 0

The TargetOffset property determines the world offset from the Target. Basically, it makes the RocketPropulsion behave as if the target were really offset by this property. It is especially useful when Target is set to nil, since this property then acts as the target position.

History 4

TargetRadius

TypeDefault
float4

The TargetRadius property determines the maximum distance from the RocketPropulsion.Target the part must be in order for the RocketPropulsion.ReachedTarget event to be fired. It does not affect the exerted forces in any way.

History 4

ThrustD

TypeDefault
float0.00100000005

The D property is used to dampen the velocity of the part in order to prevent it from overshooting the Target and causing a rubber-banding effect. It behaves similarly to BodyPosition.D.

History 4

ThrustP

TypeDefault
float5

The P property determines how much power is used while applying force in order to reach the Target position. The higher this value, the more power will be used and the faster it will be used. This property works similarly to BodyPosition.P.

History 4

TurnD

TypeDefault
float500

The D property is how much dampening will be applied to the torque used to face the Target. When the part approaches the goal orientation it needs to decelerate, otherwise it will rotate past the goal and have to stop and re-accelerate back toward the goal. This is often creates undesirable rubber-banding effect, so applying dampening using this property is how that effect is avoided. The higher this value is set, the greater the dampening curve becomes, or the slower the part will approach the goal orientation.

History 4

  • 553 Change Default of TurnD from to 500
  • 486 Change ThreadSafety of TurnD from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of TurnD from to ReadOnly
  • 47 Add TurnD

TurnP

TypeDefault
float3000

The P property determines how much power is used while applying torque in order to face the Target. The higher this value, the more power will be used and the faster it will be used.

History 4

  • 553 Change Default of TurnP from to 3000
  • 486 Change ThreadSafety of TurnP from ReadOnly to ReadSafe
  • 462 Change ThreadSafety of TurnP from to ReadOnly
  • 47 Add TurnP

fire

Parameters (0)
No parameters.
Returns (1)
null
This function is deprecated. It exists only for backward compatibility, and should not be used for new work. Fire should be used instead.

History 4

Tags: [Deprecated]

Settings