I have the following code:
game:GetService("RunService").RenderStepped:Connect(function()
if Balanceando then
local rootPart = Humanoid and Humanoid.RootPart
if rootPart and ManoDerechaAttachment and ManoIzquierdaAttachment then
AnguloBalanceo = math.sin(tick() * VelocidadBalanceo) * LimiteBalanceo
print("Ángulo de balanceo:", AnguloBalanceo)
rootPart.CFrame = CFrame.new(rootPart.Position) *
CFrame.Angles(math.rad(AnguloBalanceo), 0, 0)
end
end
end)
So, as you will notice, when the character turns, what it does is move the entire body and everything based on the HumanoidRootPart, which is a problem since the objective is to make the hands always be at the same point, that is, that the HumanoidRootPart rotate through an attachment (it would be one that is at the end of the Y axis of the HumanoidRootPart) which would ensure that when the player swings, the hands do not detach from the main position
edit: