What do you want to achieve?
I want my character to turn sideways while running (realistic torso movement while running)
What is the issue?
My character goes up and down instead of turning to the left or right.
Would be awesome if someone could tell me what value is causing this and how to fix this issue, thanks!
The snippet of code:
function Left()
if Run.IsPlaying == true and Jog.IsPlaying == false and Trot.IsPlaying == false and Walk.IsPlaying == false and CrouchWalk.IsPlaying == false then
hrp["Torso"].C0 = hrp["Torso"].C0:lerp(oC01*CFrame.Angles(0,0,math.rad(30))*CFrame.new(-1.5,0.5,0),0.08)
char.Torso.Body1.C0 = char.Torso.Body1.C0:lerp(oC02,0.08)
char.Body1.Body2.C0 = char.Body1.Body2.C0:lerp(oC03,0.08)
char.Body2.Body3.C0 = char.Body2.Body3.C0:lerp(oC04,0.08)
char.Body3.Tail1.C0 = char.Body3.Tail1.C0:lerp(oC05,0.08)
char.Torso.Neck2.C0 = char.Torso.Neck2.C0:lerp(oC06,0.08)
Korpsii
(FN Herstal)
May 15, 2024, 3:16pm
#2
Maybe this’ll work
function Left()
if Run.IsPlaying == true and Jog.IsPlaying == false and Trot.IsPlaying == false and Walk.IsPlaying == false and CrouchWalk.IsPlaying == false then
hrp["Torso"].C0 = hrp["Torso"].C0:lerp(oC01*CFrame.Angles(0,math.rad(30),0)*CFrame.new(-1.5,0.5,0),0.08)
char.Torso.Body1.C0 = char.Torso.Body1.C0:lerp(oC02,0.08)
char.Body1.Body2.C0 = char.Body1.Body2.C0:lerp(oC03,0.08)
char.Body2.Body3.C0 = char.Body2.Body3.C0:lerp(oC04,0.08)
char.Body3.Tail1.C0 = char.Body3.Tail1.C0:lerp(oC05,0.08)
char.Torso.Neck2.C0 = char.Torso.Neck2.C0:lerp(oC06,0.08)
1 Like
Oh I’ll try that, sorry for late reply and thanks for your suggestion!
Nop didn’t work, hold on maybe I got some pictures of what I wanna achieve
The character turning to the left and right while sprinting is what I want to achieve, instead my current script makes the body go down instead of turning
Scottifly
(Scottifly)
May 15, 2024, 5:08pm
#6
Try changing the order of the XYZ values so instead of:
(0,math.rad(30),0)*CFrame.new(-1.5,0.5,0),0.08)
experiment with
(0,math.rad(30),0)*CFrame.new(0.5, -1.5, 0),0.08)
or another order to see if that helps.
Just tried, also didn’t work… but also thanks for your help!