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

I have problems using RootJoint (Motor6D)?

Asked by 5 years ago
Edited 5 years ago

What am i trying to do

Make a realistic animation, moving the HumanoidRootPart or torso with RootJoint & move arms, torso and head, not legs

Problem

When i try to make the code it moves all the body wich is not good at all.

Code

I tried using C0 and it moves all the body,

local Character = workspace.maumaumaumaumaumau
local RootJoint = Character.HumanoidRootPart.RootJoint
local RootCF = CFrame.fromEulerAnglesYXZ(-1.57,0,3.14)
RootJoint.C0 = RootCF*CFrame.new(0,0,-2) --// moves root but moves ALL body

Question

How can i fix this code so it only moves Root part, arms and head?

0
I think at line 1 it's maumaumaumaumauMUA and not maumaumaumaumauMAU TheRealPotatoChips 793 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

you can use the animation editor to make the animation however you want, and then play the animation by inserting its ID in the Animate script (which you can copy from the Player when running in studio) and inserting it into StarterCharacterScripts,

But if you want to use the script still, access the Player through

game.Players.LocalPlayer.Character

this will make the script usable for anyone and prevent any spelling mistakes of your username (as its shown in the script)

also, the rootjoint (or Root in r15) is the joint that moves the entire body, so use the other joints in the character, like Neck or LeftShoulder etc etc.

hope i helped

Ad
Log in to vote
0
Answered by 5 years ago

Already found a way around this! I just have to move the humanoid root joint Y 1 up and the legs Y 1.5 down and visceversa

Answer this question