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

The right hip won't lerp no matter what! (?)

Asked by 5 years ago

There were no output errors that are stating why it's not functioning and here's the code:

if humanoid.MoveDirection == Vector3.new(0, 0, 0) then
    local startAng = torso["Right Hip"].C0
    local goalAng = startAng * CFrame.new(0.5, -1, 0) * CFrame.Angles(0, 0, 0)

    for i = 0, 1, 0.05 do
        wait()
        torso["Right Hip"].C0 = torso["Right Hip"].C0:Lerp(goalAng, i)
        print("EGGS DEE")
    end     
end

The code passes through the lerp code and went on to the print string. So, basically, I wanted the character to do a normal standing position when the player stops moving, but the legs don't even move to their proper position when idling they're just frozen in place until the character moves

0
does not work fusionFSJAL 33 — 5y
0
How do you know your if statement block is being run? SteamG00B 1633 — 5y
0
are you sure the humanoid variable is pointing to the player's humanoid? Check the spelling on wherever it is you set the variable, you might've missed a capitalization. SteamG00B 1633 — 5y
0
theres none, plus the code passes through the if statement therefore printing out the string "eggs dee" though it does not lerp the motor6d. both "Lerp" and "lerp fusionFSJAL 33 — 5y
View all comments (5 more)
0
works fine, ive tried it with a random part in the workspace fusionFSJAL 33 — 5y
0
So I just loaded into the studio and tried your code, and it works fine for me. The only question I have now for you is: are you sure you have the CFrame correct? It looks really odd... and makes your leg move into the ground. SteamG00B 1633 — 5y
0
its a footplanting script im making so your results wont be the same as mine fusionFSJAL 33 — 5y
0
Oh well actually for that purpose, I don't see any errors with your code here. Slow down the wait time to .1 or slower to see if it does happen. It might be that it does happen, but it's too fast and then another part of your script resets it. SteamG00B 1633 — 5y
0
strangely enough, it only works with the left hip, although something keeps reseting the lerping process fusionFSJAL 33 — 5y

Answer this question