For the complete documentation index, see llms.txt. This page is also available as Markdown.

MotionEvent

Gets called when the player's motion is updated, you can use this event to override the movement.

Example

script.addListener("MotionEvent", (event) => {
    // make the player 50% faster    event.x *= 1.5;
    event.z *= 1.5;
});

Extends

Properties

x

x: number

The amount to move the player in the x direction.


y

y: number

The amount to move the player in the y direction.


z

z: number

The amount to move the player in the z direction.

Methods

cancel()

cancel(): void

Cancels the event.

Returns

void

Inherited from

CancellableEvent.cancel


isCancelled()

isCancelled(): boolean

Returns

boolean

If the event is cancelled or not.

Inherited from

CancellableEvent.isCancelled

Last updated