Start typing to search packages!
animatebootstrapper
By @v6fire
Roblox
MirroredAnimateBootstrapper
Run Roblox's stock Animate LocalScript on client-owned characters (NPCs from CreateHumanoidModelFromDescriptionAsync, custom client models, etc.) without forking Animate.
LocalScripts only run under PlayerScripts, PlayerGui, Backpack, or the local player's Character. An NPC sitting in workspace does not qualify, so its Animate script never runs. This package works around that by briefly parenting the model into a valid container, starting stock Animate, then parking the script under PlayerScripts while the model lives wherever you need it.
Client-only. Requires stock R6/R15 Animate behavior.
Installation
# wally.toml
[dependencies]
animatebootstrapper = "v6fire/animatebootstrapper@0.1.3"
wally install
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AnimateBootstrapper = require(ReplicatedStorage.Packages.AnimateBootstrapper)
Adjust the require path to match your Rojo Packages layout.
Server setup (required)
The Animate LocalScript you clone must be created on the server and replicated to the client. A LocalScript bundled with a client-created model from CreateHumanoidModelFromDescriptionAsync will misbehave in live games (works in Studio, fails in Live).
This package does not create or name those templates for you. Your game is responsible for:
- Creating stock Animate
LocalScripts on the server (one per rig type you need). - Replicating them to the client (e.g.
ReplicatedStorage, a folder, or another container you already use for assets). - Passing the appropriate template into
BootstrapAnimatefrom client code.
See examples/server for one demo approach — the instance names there (BaseAnimateR6, BaseAnimateR15) are example-place conventions, not part of this library's API.
For background on the replication issue, see the DevForum thread.
Usage
Bootstrap before parenting the character into workspace (or anywhere visible) to avoid a brief flash while the model is reparented during setup.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AnimateBootstrapper = require(ReplicatedStorage.Packages.AnimateBootstrapper)
-- A server-replicated stock Animate LocalScript from your game's setup (see above).
local animateTemplate: LocalScript = ...
local character: Model = ... -- Humanoid + Animator; not yet parented to workspace
AnimateBootstrapper.BootstrapAnimate(character, animateTemplate)
character.Parent = workspace
Custom animation children
Pass a third argument to copy animation children onto the cloned Animate script (each child is :Clone()'d; sources are untouched):
AnimateBootstrapper.BootstrapAnimate(character, animateTemplate, sourceAnimate:GetChildren())
A common pattern when using CreateHumanoidModelFromDescriptionAsync is to read children from the client-bundled Animate, destroy that script, then pass the child list while cloning a server-replicated template for the script itself.
API
AnimateBootstrapper.BootstrapAnimate(character, animateScript, replacementChildren?)
| Parameter | Description |
|---|---|
character | Model with a Humanoid and Animator |
animateScript | Server-replicated stock Animate LocalScript to clone |
replacementChildren | Optional { Instance } — cloned onto the bootstrapped Animate (ClearAllChildren() first) |
Returns: The bootstrapped Animate LocalScript. Destroyed automatically when character is destroyed.
Yields until stock Animate plays its first idle animation (up to 3 seconds).
Errors if:
- Called on the server
HumanoidorAnimatoris missing- Animate does not start within the timeout (usually a replication or setup issue)
Gotchas
- Client-only — do not require or call from server scripts.
- Server-replicated Animate — the package does not verify replication; that is your responsibility.
- Bootstrap before showing — reparenting during bootstrap can cause a visible flash.
- Other LocalScripts on the character — any
LocalScriptdescendant of the model may also run during bootstrap. - Stock Animate coupling — after idle starts, the script is moved to
PlayerScriptsbecause stock Animate cachesHumanoid/Animatorat startup. This relies on unmodified Roblox Animate behavior. - Rebootstrap —
BootstrapAnimatestops existing locomotion tracks on the targetAnimatorbefore starting a new Animate instance. Pass animation children via the third argument; each is cloned so a parked or onboard source can be destroyed after bootstrap. - R6 and R15 — tested against default Roblox Animate scripts for both rig types.
Changelog
See CHANGELOG.md.
Examples
This repo includes a demo place for local testing:
rojo serve examples.project.json
| Path | Purpose |
|---|---|
examples/server | Demo server setup that extracts stock Animate scripts and replicates them |
examples/client | Demo client that spawns NPCs, bootstraps Animate, and parents to workspace |
The examples include extra scaffolding (template naming, a VerifyReplication remote, NPC spawning) that illustrates one end-to-end workflow. Copy the patterns that fit your game; you do not need to match the demo names or remotes to use the package.
License
MIT — see LICENSE.
Package Details
Install command (Click to copy)
Version
0.1.3
License
MIT
Safe for commercial use
License identified from the packaged LICENSE file; the manifest declared none.
Automated license review — not legal advice.
