|
| 18 Apr 2014 05:12 PM |
I found a method called RegisterKeyframeSequence(). Trying to figure out how to use it, I can't find much about it online. Here's what I'm trying:
print (game:GetService('KeyframeSequenceProvider'):RegisterKeyframeSequence(function() resetAnimation() animationLength = 2 updateTimeLabels() loopAnimation = true animationPriority = "Movement" local keyframe = nil local part = nil local pose = nil keyframe = createKeyframe(0) keyframe.Name = "Keyframe" 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["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 Leg"] 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["Torso"] 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) keyframe = createKeyframe(1) keyframe.Name = "Keyframe" part = partListByName["Right Arm"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(-0.5, -0.20710676908493, 0, 0.70710676908493, 0.70710676908493, 0, -0.70710676908493, 0.70710676908493, 0, 0, 0, 1) part = partListByName["Right Leg"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(-0.70710676908493, 0.29289323091507, 0, 0.70710676908493, 0.70710676908493, 0, -0.70710676908493, 0.70710676908493, 0, 0, 0, 1) part = partListByName["Left Arm"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(0.5, -0.20710682868958, 0, 0.70710676908493, -0.70710676908493, 0, 0.70710676908493, 0.70710676908493, 0, 0, 0, 0.99999994039536) part = partListByName["Head"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(0, -0.14644661545753, -0.35355338454247, 1, 0, 0, 0, 0.70710676908493, 0.70710676908493, 0, -0.70710676908493, 0.70710676908493) part = partListByName["Torso"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) part = partListByName["Left Leg"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(0.70710676908493, 0.29289323091507, 0, 0.70710676908493, -0.70710676908493, 0, 0.70710676908493, 0.70710676908493, 0, 0, 0, 1) keyframe = createKeyframe(2) keyframe.Name = "Keyframe" 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["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["Head"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1) part = partListByName["Torso"] pose = initializePose(keyframe, part.Item) pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 1.7484555314695e-007, 0, 1, 0, -1.7484555314695e-007, 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) 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() end)) |
|
|
| Report Abuse |
|