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

Principle of Operation

Overview

Before explaining the detailed features of ActionSequence, this section first covers how ActionSequence works internally. This helps you understand how it operates at runtime and identify technical considerations when using its features.

Runtime Behavior

ActionSequence is an object defined based on static data and cannot be directly created at runtime using Instance.new or Clone.

When execution is requested through the Play method, the original instance is duplicated under Humanoid.ActionRunner, and the action is executed based on this duplicated instance.

Due to this structure, when connecting events within ActionSequence scripts, you must reference the runtime duplicated instance rather than the original instance. Therefore, instead of using absolute paths, you should reference based on script.Parent.

Execution Flow

When an action execution request occurs, the sequence execution always starts on the server, regardless of whether it was called from the Client or Server. Script events within the ActionSequence are then connected, and the sequence along with its child objects is replicated to all clients.

Once replication is complete, the timeline is played on each client, and direction elements such as animations, effects, and sounds are executed.

In other words, ActionSequence does not operate by being dynamically created or directly cloned via scripts at runtime. Instead, it runs by duplicating predefined data at execution time to perform the direction.

The server synchronizes the overall progression based on the sequence execution timing, and any time differences between clients are automatically corrected. Additionally, to maintain gameplay consistency, core logic such as attack collision detection is handled on the server.

Creation and Destruction Flow

ActionSequence runs until the defined playback duration is completed.

Once playback ends, the duplicated ActionSequence instance used for execution is automatically removed, and any events connected to the ActionSequence, as well as child objects configured under it such as Parts, VFX, and scripts, are also cleaned up.

Notes on Playback Duration

To clearly define the creation and destruction timing of duplicated instances generated during ActionSequence execution, it is recommended to also clean up the playback duration when the action ends. If the playback duration is unnecessarily long, the removal of instances may be delayed.

  • Bad Example

  • Good Example

The playback duration can be adjusted by enterin

g values in the start/end time fields at the top of the timeline, or by moving the scrubber to the desired position and using the set end position button.

Last updated