Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to read a saved animation's "value"?

Asked by 9 years ago

In the animation editor, I made a position for a leg that I want to CFrame in my line of code. My question is: Is it possible to take the saved animation from the value that was left behind?

The value left behind was this:

resetAnimation()
animationLength = 2
updateTimeLabels()
loopAnimation = false
animationPriority = "Action"
local keyframe = nil
local part = nil
local pose = nil
keyframe = createKeyframe(0)
keyframe.Name = "Keyframe"
part = partListByName["Torso"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Head"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Right Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Left Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Right Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Left Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
keyframe = createKeyframe(0.4)
keyframe.Name = "Keyframe"
part = partListByName["Right Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(-0.31019133329391, 0.060307424515486, 0.28323397040367, 0.64278727769852, 0.26200270652771, -0.71984654664993, 0, 0.93969255685806, 0.34202009439468, 0.76604473590851, -0.21984618902206, 0.60402250289917)
partInclude["Left Leg"] = true
partInclude["Right Leg"] = true
partInclude["Left Arm"] = true
partInclude["Head"] = true
partInclude["Torso"] = true
partInclude["HumanoidRootPart"] = true
partInclude["Right Arm"] = true
cursorTime = 0
updatePartInclude()
updateCursorPosition()
nudgeView()
updateLoopButton()
updatePriorityLabel()

1 answer

Log in to vote
0
Answered by
yumtaste 476 Moderation Voter
9 years ago

Look for the "AnimSaves"model (doesn't have to be exactly "AnimSaves", but it needs to have "Anim" in it) in the model that you're animating. In that model, there is an animation called "TestAnim." That's the value of the animation, and it can be played.

EDIT: The way you get the correct animation in "TestAnim" is by playing the animation in the editor.

Ad

Answer this question