Waist Movement Problem

I’m having a problem where arms do not move with the torso when the character has animations.

Without animations:

With animations:

Script:

task.wait()

local Ang = CFrame.Angles
local aSin = math.asin
local aTan = math.atan

local Cam = workspace.CurrentCamera

local Plr = game.Players.LocalPlayer
local Mouse = Plr:GetMouse()
local Body = Plr.Character or Plr.CharacterAdded:wait()
local Head = Body:WaitForChild("Head")
local Hum = Body:WaitForChild("Humanoid")
local Torso = Body:WaitForChild("UpperTorso")
local Neck = Head:WaitForChild("Neck")
local Waist = Torso:WaitForChild("Waist")

local HeadHorFactor = 0
local HeadVertFactor = 0
local BodyHorFactor = 0
local BodyVertFactor = 1

local UpdateSpeed = .5

local NeckOrgnC0 = Neck.C0
local WaistOrgnC0 = Waist.C0

Neck.MaxVelocity = 1/3

game:GetService("RunService").RenderStepped:Connect(function()
	local CamCF = Cam.CoordinateFrame
	if Body["UpperTorso"] ~= nil and Body["Head"] ~= nil then
		local TrsoLV = Torso.CFrame.lookVector
		local HdPos = Head.CFrame.p
		if Neck and Waist then
			if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
				local Dist = nil;
				local Diff = nil;
				
				Dist = (Head.CFrame.p-CamCF.p).magnitude
				Diff = Head.CFrame.Y-CamCF.Y
				
				Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
				Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
			end
		end
	end
end)

(it is an open-source script)

Try disabling animation retargeting from the workspace

image

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.