Animated Objects
Warning
This system is in beta, you may experience bugs.
If you do run into one, or have any ideas/suggestions, it would help everyone if you could please create an issue.
Animated Object Setup
If at any point the motor6d.Part1.Name
is not the same as it was in the uploaded animation, the animated object will not animate.
Enable initOptions.AnimatedObjectsDebugMode
for detailed prints about animated objects.
If at any point an attached animated object is a tool
, the Rig.Right Arm.RightGrip
or Rig.RightHand.RightGrip
weld will be disabled. It will be be re-enabled upon detaching.
The explanations below use the image above as an example.
motor6d
only
Useful if you have a tool
that is already equipped and just want to attach the motor6d
to it and the rig for animating (works for models
too). (jump to "motor6d only" finished product)
Copy the old
motor6d
("Handle"
) that was used for attaching thetool
("Sword"
) to the rig during animating.Paste the new
motor6d
intoAnimations.Deps.AnimatedObjects
.Rename the new
motor6d
totool.Name
.Create two
StringValues
inside of the newmotor6d
and name them"Part0Name"
and"Part1Name"
.Set
Part0Name.Value
tomotor6d.Part0.Name
andPart1Name.Value
tomotor6d.Part1.Name
.(optional) Configure your
AnimationIds
module to enable auto attaching and auto detaching.
"motor6d only" finished product:
"motor6d only" code example:
-- In a ServerScript
Animations:AttachAnimatedObject(game.Players.YourName, "Sword")
-- or in the AnimationIds module
local AnimationIds = {
Player = {
-- The sword motor6d will be auto attached to the equipped
-- sword tool when the "SwordWalk" animation plays
SwordWalk = HasAnimatedObject(0000000, "Sword", { AutoAttach = true })
}
}
basepart
, model
, tool
Useful if you want to attach a clone of an object to the rig for an animation. (jump to "basepart, model, tool" finished product)
Copy the old
basepart
,model
,tool
that was used as theanimatedObject
in the rig during animating.- Paste the new
animatedObject
intoAnimations.Deps.AnimatedObjects
.
- Paste the new
Copy the old
motor6d
that was used for attaching theanimatedObject
to the rig during animating.- Paste the new
motor6d
into the newanimatedObject
.
- Paste the new
Rename the new
motor6d
to"AnimatedObjectMotor6D"
.Create two
StringValues
inside of the newmotor6d
and name them"Part0Name"
and"Part1Name"
.Set
Part0Name.Value
tomotor6d.Part0.Name
andPart1Name.Value
tomotor6d.Part1.Name
.(optional) Configure your
AnimationIds
module to enable auto attaching and auto detaching.
"basepart, model, tool" finished product:
"basepart, model, tool" code example:
-- In a ServerScript
Animations:AttachAnimatedObject(game.Players.YourName, "Sword")
-- or in the AnimationIds module
local AnimationIds = {
Player = {
-- The sword tool will be auto attached when the "SwordWalk"
-- animation plays
SwordWalk = HasAnimatedObject(0000000, "Sword", { AutoAttach = true })
}
}
folder
Useful if you want to attach a clone of multiple objects to the rig for an animation. (jump to "folder" finished product)
- Create a folder inside of
Animations.Deps.AnimatedObjects
named whatever you would like. - Repeat the "basepart, model, tool" process for all the
animatedObjects
that you want to be attached at the same time. - (optional) Configure your
AnimationIds
module to enable auto attaching and auto detaching.
"folder" finished product:
"folder" code example:
-- In a ServerScript
Animations:AttachAnimatedObject(game.Players.YourName, "MyAnimatedObjectsGroup")
-- or in the AnimationIds module
local AnimationIds = {
Player = {
-- The children of "MyAnimatedObjectsGroup" will be auto
-- attached when "Walk" animation is played and auto detached
-- when it stops
Walk = HasAnimatedObject(0000000, "MyAnimatedObjectsGroup", { AutoAttach = true, AutoDetach = true })
}
}