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

Public animation with Motor6Ds?

Asked by 3 years ago
Edited 3 years ago

Well, I'm trying to figure out how i can animation without publishing animations to the website because I'm trying to create public animations. But I'm not sure how i can do something like this. This cool plugin exists, but to frick with it. If THIS is the hierarchy and THIS is the script,

return {
    Properties = {
        Looping = false,
        Priority = Enum.AnimationPriority.Action
    },
    Keyframes = {
        [0] = {
            ["HumanoidRootPart"] = {
                ["Torso"] = {
                    ["Right Arm"] = {
                        CFrame = CFrame.Angles(math.rad(-20.913), math.rad(-40.795), math.rad(59.645)),
                    },
                    ["Left Arm"] = {
                        CFrame = CFrame.Angles(math.rad(-20.913), math.rad(40.795), math.rad(-59.645)),
                    },
                },
            },
        },
        [0.2] = {
            ["HumanoidRootPart"] = {
                ["Torso"] = {
                    ["Right Arm"] = {
                        CFrame = CFrame.Angles(0, 0, math.rad(90.012)),
                    },
                    ["Left Arm"] = {
                        CFrame = CFrame.Angles(0, math.rad(0.057), math.rad(-90.069)),
                    },
                },
            },
        },
        [0.367] = {
            ["HumanoidRootPart"] = {
                ["Torso"] = {
                    ["Right Arm"] = {
                        CFrame = CFrame.Angles(0, 0, math.rad(0.057)),
                    },
                    ["Left Arm"] = {
                        CFrame = CFrame.Angles(0, math.rad(0.057), math.rad(-0.057)),
                    },
                },
            },
        },
    }
}

What am I supposed to do??? It doesn't include the names of the Motor6Ds it's trying to animate! Help please. Edit: Managed to get a thing like this going:

local defaultJointPos = {
    ["Left Hip"] = CFrame.new(-1,-1,0),
    ["Neck"] = CFrame.new(0,1,0),
    ["Left Shoulder"] = CFrame.new(-1,0.5,0),
    ["Right Shoulder"] = CFrame.new(1,0.5,0),
    ["Right Hip"] = CFrame.new(1,-1,0),
    ["Root Hip"] = CFrame.new(0,0,0)
}

local joints = {
    ["Left Hip"] = script.Parent.Torso["Left Hip"],
    ["Neck"] = script.Parent.Torso["Neck"],
    ["Left Shoulder"] = script.Parent.Torso["Left Shoulder"],
    ["Right Shoulder"] = script.Parent.Torso["Right Shoulder"],
    ["Right Hip"] = script.Parent.Torso["Right Hip"],
    ["Root Hip"] = script.Parent.HumanoidRootPart["RootJoint"]
}

joints["Neck"].C0 = CFrame.new(0,0,0)

But what do i do now?

1 answer

Log in to vote
0
Answered by 3 years ago

What the script is doing, from my understanding, is basically building an animation by creating the keyframes. It doesn't use the name of the Motor6Ds, rather it uses the part its animating itself. Short explaination of what its doing:

        [0] = { -- time at which the keyframe happens
            ["HumanoidRootPart"] = { -- the torso is welded to the HRP, so it comes here first
                ["Torso"] = { -- the arms are welded to the Torso, so it comes here first
                    ["Right Arm"] = { -- the right arm to be animated
                        CFrame = CFrame.Angles(math.rad(-20.913), math.rad(-40.795), math.rad(59.645)), -- changes the arms rotation to this value
                    },
                    ["Left Arm"] = { -- the left arm to be animated
                        CFrame = CFrame.Angles(math.rad(-20.913), math.rad(40.795), math.rad(-59.645)), -- changes the arms rotation to this value
                    },
                },
            },
        },

Comment if you didn't understand, you just need some table knowledge to be able to read this pretty easily. If you're not familiar with tables, this is called a dictionary, and you should definitely learn about them.

Off-topic though, You can just create an animation and save it to a dummy, and others can publish it, rather than doing all of this.

0
Hmm, thats interesting. I know a lot about tables. Also, I can't save it to a dummy because I'm making a Star Glitcher Script. I'll make sure it is TOS friendly cause i don't wanna get banned. busterk66 18 — 3y
0
Pls answer to my comment busterk66 18 — 3y
0
What do you mean answer to your comment, you never asked a question so I assumed you got it figured out. SazaSensei 85 — 3y
0
Well, here's my question: How would i actually animate it with the knowing that these are parts not motor6ds? because i could lerp the parts, but would the lerped parts follow the character? busterk66 18 — 3y
View all comments (5 more)
0
Lerping wouldn't work, since it wouldn't replicate, and you probably shouldn't do it on the server. I don't know what a star glitcher is, however if you can't save it to a dummy you really got no options for public animations. SazaSensei 85 — 3y
0
You... really don't know what a star glitcher is? here's the code for it https://hastebin.com/elalurujes.lua busterk66 18 — 3y
0
From what I see in the code its lerping the C0 of the Motor6Ds inside the torso. Never knew this was a thing, probably because I don't exploit. But yeah theres your answer ig SazaSensei 85 — 3y
0
I don't exploit either. I usually use require scripts on games where they are supported. busterk66 18 — 3y
0
Edited my original question. can you take a look at the new part pls and give me a way to read the other script with the CFrames (already tried and was stumped.)? busterk66 18 — 3y
Ad

Answer this question