Need help relating a torso tilt

Hey, I am trying to create this effect but in R6.
the effect:
https://gyazo.com/4e47ca8ef33b1234070cbbd11f37354c

Can someone help me with recreating this?

Try to replace stuff like UpperTorso with Torso, I mean, everything that is from R15 you should change it to R6

1 Like

I tried that but it does nothing, this time NOTHING happens.

1 Like

It would be better if you show us your code.

2 Likes

I tried modifying a free model script becaise I had no idea how I was going to get the original R15 effect.

–[[
J Jackson (Jon) [EchoZenkai]
13:25 30/12/2018 (GMT)

🎉🎉🎉 Happy new year! 🎉🎉🎉


PUT THIS IN StarterGui / StarterCharacterScripts

Shoot me (EchoZenkai) a PM if you're having any issues!

–]]

repeat wait() until game.Players.LocalPlayer.Character
local character = game.Players.LocalPlayer.Character
local MaximumDegrees = 60

local waist = character:WaitForChild(“UpperTorso”):WaitForChild(“Waist”)
local root = character:WaitForChild(“LowerTorso”):WaitForChild(“Root”)
local baseCF = waist.C0
local rootCF = root.C0
game:GetService(“RunService”):BindToRenderStep(“MovementThing”,Enum.RenderPriority.Last.Value,function()
if character.PrimaryPart and character:FindFirstChild(“Humanoid”) then
local hrp = character.PrimaryPart

	local pos = (hrp.CFrame * CFrame.new(0,-2,0)).p
	local nor = Vector3.new() -- can set this up if you want this to apply to wall walking etc. Use raycasts and get the normal vector
	local cross = Vector3.new(0, 1, 0):Cross(nor)
	local angle =  math.asin(cross.magnitude)
	
	local hum = character.Humanoid

	local desiredCF = CFrame.new(pos) * CFrame.fromAxisAngle(cross.magnitude == 0 and Vector3.new(1, 0, 0) or cross.unit, angle) * CFrame.new(Vector3.new(), hum.MoveDirection)
	local turnThing = desiredCF.lookVector:Dot(hrp.CFrame.rightVector)
	
		local turnVal = (0.125) * (hrp.Velocity.magnitude)
		if math.abs(turnThing) > 0.5 then
			local Deg = math.rad(math.clamp(math.deg(turnThing * -turnVal),-MaximumDegrees,MaximumDegrees))
			root.C0 = root.C0:lerp(rootCF * CFrame.Angles(0, 0,Deg), 0.0125)
			waist.C0 = waist.C0:lerp(baseCF * CFrame.Angles(0, 0, Deg), 0.0125)
		else
			root.C0 = root.C0:lerp(rootCF, 0.125)
			waist.C0 = waist.C0:lerp(baseCF, 0.125)
		end
	
end

end)

1 Like

The HumanoidRootPart isn’t the PrimaryPart with R6, the Head is. Try character.HumanoidRootPart there.

4 Likes

Hm, Didn’t work.
the code so far:
repeat wait() until game.Players.LocalPlayer.Character
local character = game.Players.LocalPlayer.Character
local MaximumDegrees = 60
local root = character:WaitForChild(“HumanoidRootPart”):WaitForChild(“RootJoint”)
local rootCF = root.C0
game:GetService(“RunService”):BindToRenderStep(“MovementThing”,Enum.RenderPriority.Last.Value,function()
if character.PrimaryPart and character:FindFirstChild(“Humanoid”) then
local hrp = character.HumanoidRootPart
local pos = (hrp.CFrame * CFrame.new(0,-2,0)).p
local nor = Vector3.new() – can set this up if you want this to apply to wall walking etc. Use raycasts and get the normal vector
local cross = Vector3.new(0, 1, 0):Cross(nor)
local angle = math.asin(cross.magnitude)

	local hum = character.Humanoid

	local desiredCF = CFrame.new(pos) * CFrame.fromAxisAngle(cross.magnitude == 0 and Vector3.new(1, 0, 0) or cross.unit, angle) * CFrame.new(Vector3.new(), hum.MoveDirection)
	local turnThing = desiredCF.lookVector:Dot(hrp.CFrame.rightVector)
	
		local turnVal = (0.125) * (hrp.Velocity.magnitude)
		if math.abs(turnThing) > 0.5 then
			local Deg = math.rad(math.clamp(math.deg(turnThing * -turnVal),-MaximumDegrees,MaximumDegrees))
			root.C0 = root.C0:lerp(rootCF * CFrame.Angles(0, 0,Deg), 0.0125)
		else
			root.C0 = root.C0:lerp(rootCF, 0.125)
		end
	
end

end)

1 Like